본문 바로가기
python-algorithm

[백준] 16495

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

1
2
3
4
5
s= input()
ans=0
for i in range(len(s)):
    ans+= (ord(s[i])-64)*pow(26,(len(s)-i-1))
print(ans)
cs
반응형

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

[백준] 17293  (0) 2021.02.05
[백준] 16969  (0) 2021.01.28
[백준] 15904  (0) 2021.01.28
[백준] 15720  (0) 2021.01.28
[백준] 14726  (0) 2021.01.28

댓글