728x90
반응형
구현 언어: 파이썬
cnt = [0, 0, 0]
same = 0
a = list(map(int, input().split()))
for j in range(0,3):
for i in range (0,3):
if a[j] == a[i] and j != i:
cnt[j] += 1
same = a[j]
if max(cnt[0], cnt[1], cnt[2]) == 2:
print(10000 + same * 1000)
elif max(cnt[0], cnt[1], cnt[2]) == 1:
print(1000 + same * 100)
else:
print(max(a[0], a[1], a[2])*100)
시도 횟수: 1
구현 포인트:
조금 더 좋은 방법이 있을 것 같은데 ..
728x90
반응형
'Archive > BOJ' 카테고리의 다른 글
백준 2752번: 세수정렬 (0) | 2021.02.03 |
---|---|
백준 2525번: 오븐시계 (0) | 2021.02.03 |
백준 1297번: TV 크기 (0) | 2021.02.03 |
백준 1212번: 8진수 2진수 (0) | 2021.02.03 |
백준 2920번: 음계 (0) | 2021.02.03 |