지나가던 개발자
[Python] 백준 10384번(팬그램) 문제 풀이 본문
from string import ascii_uppercase
for i in range(int(input())):
tc = [x for x in list(input().upper().replace(" ", "")) if x in list(ascii_uppercase)]
if set(tc) == set(ascii_uppercase):
triple_pangram = True
double_pangram = True
pangram = True
for j in set(tc):
if tc.count(j) >= 3:
continue
elif tc.count(j) == 2:
triple_pangram = False
elif tc.count(j) == 1:
double_pangram = False
if triple_pangram:
print("Case "+str(i+1)+": Triple pangram!!!")
elif double_pangram:
print("Case "+str(i+1)+": Double pangram!!")
else:
print("Case "+str(i+1)+": Pangram!")
else:
print("Case "+str(i+1)+": Not a pangram")
'PS > Python' 카테고리의 다른 글
[Python] 백준 10821번(정수의 개수) 문제 풀이 (0) | 2022.11.14 |
---|---|
[Python] 백준 12605번(단어순서 뒤집기) 문제 풀이 (0) | 2022.11.14 |
[Python] 백준 11536번(줄 세우기) 문제 풀이 (0) | 2022.11.14 |
[Python] 백준 25206번(너의 평점은) 문제 풀이 (0) | 2022.11.13 |
[Python] 백준 5637번(가장 긴 단어) 문제 풀이 (0) | 2022.11.12 |
Comments