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

[백준/파이썬] 32722번 Juta teekond

by 현장 2024. 11. 21.

-Code

def solution(idx, n):
    if idx == 1 and n != 1 and n != 3:
        return True
    if idx == 2 and n != 6 and n != 8:
        return True
    if idx == 3 and n != 2 and n != 5:
        return True
    return False

flag = True
for i in range(1, 4):
    n = int(input())

    if solution(i, n):
        flag = False

print("JAH" if flag else "EI")