We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b1331c commit c1df207Copy full SHA for c1df207
1 file changed
live12/test124/문제1/박희경.py
@@ -0,0 +1,32 @@
1
+import sys
2
+
3
+input = sys.stdin.readline
4
5
+s = list(map(str, input().rstrip()))
6
+p = list(map(str, input().rstrip()))
7
8
9
+i = 0
10
+count = 0
11
12
+while i < len(p):
13
+ max_len = 0
14
15
+ for j in range(len(s)):
16
+ l = 0
17
+ while i + l < len(p) and j + l < len(s) and p[i + l] == s[j + l]:
18
+ l += 1
19
+ max_len = max(max_len, l)
20
21
+ i += max_len
22
+ count += 1
23
24
+print(count)
25
26
+"""
27
+xy0z
28
+zzz0yyy0xxx
29
30
+abaabba
31
+aaabbbabbbaaa
32
0 commit comments