본문 바로가기
python-algorithm

[백준] 3059

by 무적김두칠 2021. 1. 8.

1
2
3
4
5
6
7
8
9
10
import sys
for _ in range(int(sys.stdin.readline())):
    s=(sys.stdin.readline())
    tmp=[0]*26
    cnt=0
    for i in range(len(s)-1):
        tmp[ ord (s[i])-65  ]=1
    for i in rangelen (tmp)):
        if tmp[i]==0:cnt+=65+i
    print(cnt)
cs
반응형

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

[백준] 3449  (0) 2021.01.08
[백준] 3062  (0) 2021.01.08
[백준] 3052  (0) 2021.01.08
[백준] 2920  (0) 2021.01.08
[백준] 2908  (0) 2021.01.08

댓글