프로그래머스 lv0 치킨쿠폰
1. 개요
2. 풀이
def solution(chicken):
answer = 0
while chicken >= 10:
newCoupon = chicken//10
answer += newCoupon
chicken = newCoupon + chicken%10
return answer
def solution(chicken):
answer = 0
while chicken >= 10:
newCoupon = chicken//10
answer += newCoupon
chicken = newCoupon + chicken%10
return answer
Leave a comment