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

[백준/파이썬] 10410번 Eligibility

by 현장 2024. 9. 19.

-Code

for _ in range(int(input())):
    a, b, c, d = input().split()
    b = int(b.split('/')[0])
    c = int(c.split('/')[0])

    print(a, end=" ")
    if b >= 2010 or c >= 1991:
        print("eligible")
    elif int(d) >= 41:
        print("ineligible")
    else:
        print("coach petitions")