본문 바로가기
Algorithm/Implementaion

[백준] 2476번 주사위 게임

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

어씨 성능 개선하다가 잘 못 생각해서 꼬였었당... 

 

import sys
N = int(sys.stdin.readline())
ans = 0
for i in range(N):
    temp = 0
    dice = list(map(int, sys.stdin.readline().split()))
    dice.sort()
    front = dice[0]
    back = dice[1]
    if back > front:
        front = back
    x = dice.count(front)
    if x == 3:
        temp = 10000 + front * 1000
    if x == 2:
        temp = 1000 + front * 100
    if dice[0] != dice[1] != dice[2]:
        temp = max(dice) * 100
    if ans < temp:
        ans = temp
print(ans)

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

[백준] 2935번 소음  (0) 2020.10.20
[백준] 2530번 인공지능 시계  (0) 2020.10.20
[백준] 4101번 크냐?  (0) 2020.10.20
[백준] 2525번 오븐 시계  (0) 2020.10.20
[백준] 2490번 윷놀이  (0) 2020.10.20

댓글