Skip to content

Commit 88289e6

Browse files
committed
[BOJ] 6550 부분 문자열 (S5)
1 parent 6127e05 commit 88289e6

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

심수연/9주차/260225.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# https://www.acmicpc.net/problem/6550
2+
3+
import sys
4+
input = sys.stdin.readline
5+
6+
while True:
7+
try:
8+
s, t = map(str, input().split())
9+
10+
flag = 0
11+
idx = 0
12+
13+
for i in range(len(t)):
14+
if idx < len(s) and s[idx] == t[i]:
15+
idx += 1
16+
17+
if (idx == len(s)): # 부분 문자열인 것!
18+
flag = 1
19+
break # for문 탈출
20+
21+
if flag == 1:
22+
print("Yes")
23+
else:
24+
print("No")
25+
26+
except:
27+
break

0 commit comments

Comments
 (0)