백준 문제풀이

baekjoon - python - 2480

winston1214 2020. 8. 24. 13:47
반응형

https://www.acmicpc.net/problem/2480

 

2480번: 주사위 세개

1에서부터 6까지의 눈을 가진 3개의 주사위를 던져서 다음과 같은 규칙에 따라 상금을 받는 게임이 있다.  같은 눈이 3개가 나오면 10,000원+(같은 눈)*1,000원의 상금을 받게 된다.  같은 눈이 2개만

www.acmicpc.net

 

# @Author YoungMinKim
# baekjoon
x= list(map(int,input().split()))
if len(set(x)) == 1:
    print(10000+x[0]*1000)
elif len(set(x)) == 2:
    if x.count(x[0]) == 2:
        print(1000+x[0]*100)
    elif x.count(x[1]) == 2:
        print(1000 + x[1]*100)
else:
    print(max(x)*100)
반응형