[백준] 2480 주사위 세게(python)

나영·2024년 9월 12일

백준

목록 보기
1/9

✅문제

✏️풀이

a, b, c = map(int, input().split())

if a == b == c:
	print(10000 + a * 1000)
elif a == b or a == c or b == c:
	print(1000 + a * 100) if a == c else print(1000 + b * 100)
else: 
	print(max(a, b, c) * 100)

📌체크

map(function, iterable)
: 각 요소들에 특정한 함수를 적용시킬 때 사용되는 함수

dice = input.split()
dice_a = int(dice[0])
dice_b = int(dice[1])
dice_c = int(dice[2])

와 같이 써야하는것을 위의 문제 풀이로 간단히 사용 가능

⭕정답확인

0개의 댓글