223일차 - BOJ no.9996

Dzeko·2022년 3월 1일
0
post-thumbnail

https://www.acmicpc.net/problem/9996

My Solution

import sys

N = int(sys.stdin.readline().rstrip())
pattern = sys.stdin.readline().rstrip()
arr = [sys.stdin.readline().rstrip() for n in range(N)]
x, y = pattern.split('*')
for i in arr:
    if x == i[:len(x)] and y == i[-len(y):] and len(x+y) <= len(i):
        print('DA')
    else:
        print('NE')
profile
Do or Die

0개의 댓글