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
반응형
'개인공부 > Baekjoon Online Judge' 카테고리의 다른 글
[Python] 3052번 (0) | 2022.05.20 |
---|---|
[Python] 2577번 (0) | 2022.05.20 |
[Python] 2525번 (0) | 2022.05.19 |
[C++] 2438번 (0) | 2021.05.04 |
[C++] 11022번 (0) | 2021.05.04 |