본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 20350번 Account Numbers

by 현장 2024. 2. 4.

-Code

s = input()
transform = ""
for w in s[4:] + s[:4]:
    if w.isalpha():
        transform += str(ord(w) - 55)
    else:
        transform += w
print("correct" if int(transform) % 97 == 1 else "incorrect")