python math.trunc() method 썸네일형 리스트형 [코딩테스트 입문] 옷가게 할인 받기 옷가게 할인 받기 1안) solution.py def solution(price): answer = 0 if price >= 500000: answer = int(price * 0.8) elif price >= 300000: answer = int(price * 0.9) elif price >= 100000: answer = int(price * 0.95) else: answer = int(price) return answer 2안) solution.py import math def solution(price): answer = 0 if price >= 500000: answer = price - price * 20 / 100 elif price >= 300000: answer = price - pric.. 더보기 이전 1 다음