python-algorithm

백준 10384 팬그램

무적김두칠 2021. 12. 8. 09:53

1
2
3
4
5
6
7
8
9
10
11
for _ in range(int(input())):
    s=input()
    s=s.lower()
    tmp=[0]*26
    for i in s:
        if i.isalpha():
            tmp[ord(i)-97]+=1
    if min(tmp)>=3print("Case %d: Triple pangram!!!"%(_+1))
    elif min(tmp)>=2print("Case %d: Double pangram!!"%(_+1))
    elif min(tmp)>=1print("Case %d: Pangram!"%(_+1))
    else :print("Case %d: Not a pangram"%(_+1))
cs
반응형