본문 바로가기
python-algorithm

백준 4775 Spelling Be

by 무적김두칠 2024. 12. 3.

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

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
if __name__ == '__main__':
    num_word = int(input())
 
    word_dict = {}
    cnt = 1
    #word_dict = [input() for i in range(n)]
    for i in range(num_word):
        word_dict[input()] = 1
    n = int(input())
    for i in range(1, n+1):
        not_exist = []
        while True:
            s = input()
 
            if s == "-1":
                break
            if s not in word_dict:
                not_exist.append(s)
 
        if not_exist:
            print(f"Email {i} is not spelled correctly.")
            for word in not_exist:
                print(word)
        else:
            print(f"Email {i} is spelled correctly.")
    print("End of Output")
cs

내가 영어를 잘 못하나.. 해석이 어렵네요

반응형

'python-algorithm' 카테고리의 다른 글

백준 32929 UOS 문자열  (0) 2024.12.18
백준 27058 Message Decowding  (0) 2024.12.16
백준 18698 The Walking Adam  (0) 2024.12.03
백준 32498 Call for Problems  (0) 2024.11.27
백준 32384 사랑은 고려대입니다  (0) 2024.11.27

댓글