H E E 2022. 5. 19. 15:40
728x90

2480번 - 주사위 세개 ( https://www.acmicpc.net/problem/2480 )

 

주석 O

one, two, three = map(int, input().split(" "))

if one == two == three :            # 셋 다 같을 때
    print(10000 + one * (1000))
elif one == two or one == three :   # 두개만 같을 때
    print(1000 + one * (100))
elif two == three :
    print(1000 + three * (100))
else :                              # 다 다를때
    print(100 * max(one, two, three))

 

주석 X

one, two, three = map(int, input().split(" "))

if one == two == three :
    print(10000 + one * (1000))
elif one == two or one == three :
    print(1000 + one * (100))
elif two == three :
    print(1000 + three * (100))
else :
    print(100 * max(one, two, three))

 

728x90
반응형