본문 바로가기
Algorithm/Implementaion

[백준] 2490번 윷놀이

by 등촌동 꼬북이 2020. 10. 20.

리스트로 만들어 놓고 출력하면 더 빠르다

 

import sys
ans = []
for _ in range(3):
    count = list(map(int, sys.stdin.readline().split())).count(1)
    if count == 4:
        ans.append("E")
    elif count == 3:
        ans.append("A")
    elif count == 2:
        ans.append("B")
    elif count == 1:
        ans.append("C")
    else:
        ans.append("D")
for i in range(3):
    print(ans[i])

'Algorithm > Implementaion' 카테고리의 다른 글

[백준] 2476번 주사위 게임  (0) 2020.10.20
[백준] 4101번 크냐?  (0) 2020.10.20
[백준] 2525번 오븐 시계  (0) 2020.10.20
[백준] 10773번 제로  (0) 2020.10.16
[백준] 1475번 방번호  (0) 2020.10.16

댓글