알고리즘
[백준] 2909번 캔디 구매 python
_Myway
2024. 1. 28. 21:27
c, zero = map(int, input().split())
money = int(str(1)+ "0"*zero)
m = c//money
n = c % money
if zero==0:
print(c)
else:
if n >= money//2:
price = money*(m+1)
else:
price = money*m
print(price)