Algorithm/๋ฐฑ์ค
[๋ฐฑ์ค] 5622 ๋ค์ด์ผ (ํ์ด์ฌ/python)
chjcoder
2023. 6. 19. 22:27
๐๋ฌธ์
https://www.acmicpc.net/problem/5622
๐์ด๋ค ์๊ณ ๋ฆฌ์ฆ?
1. ๋จ์ ๊ตฌํ!
๐ป์ฝ๋
word = input()
alphabet = ['ABC','DEF','GHI','JKL','MNO','PQRS','TUV','WXYZ']
time = 0
for i in range(len(word)):
for j in alphabet:
if word[i] in j:
time += alphabet.index(j) + 3
print(time)