파이썬 56221 [백준] 5622 다이얼 (파이썬/python) 🎈문제 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) 2023. 6. 19. 이전 1 다음