We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3b1331c + 1418fe4 commit edf686fCopy full SHA for edf686f
2 files changed
live12/test124/문제1/백한결.py
@@ -0,0 +1,29 @@
1
+import sys
2
+
3
+def main():
4
+ input = sys.stdin.readline
5
+ S = input().strip()
6
+ P = input().strip()
7
8
+ Slen = len(S)
9
+ Plen = len(P)
10
+ i = 0
11
+ count = 0
12
13
+ while i < Plen:
14
+ maxLen = 0
15
16
+ for j in range(len(S)):
17
+ k = 0
18
+ while i + k < Plen and j + k < Slen and P[i + k] == S[j + k]:
19
+ k += 1
20
+ maxLen = max(maxLen, k)
21
22
+ i += maxLen
23
+ count += 1
24
25
+ print(count)
26
27
28
+if __name__ == '__main__':
29
+ main()
live12/test124/문제2/백한결.py
@@ -0,0 +1,18 @@
+ N = int(input())
+ result = []
+ def dfs(num):
+ result.append(num)
+ last_digit = num % 10
+ for i in range(last_digit):
+ dfs(num * 10 + i)
0 commit comments