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

[백준/파이썬] 4581번 Voting

by 현장 2023. 6. 8.

-Code

while True:
    vote = input()

    if vote == '#':
        break

    if vote.count("A") >= len(vote) / 2:
        print("need quorum")
    elif vote.count("Y") > vote.count("N"):
        print("yes")
    elif vote.count("Y") < vote.count("N"):
        print("no")
    else:
        print("tie")