1. 문제
https://programmers.co.kr/learn/courses/30/lessons/82612?language=python3
2. 풀이
2.1. 정답 풀이
def solution(price, money, count):
val = price*count*(count+1)/2 - money
return val if val > 0 else 0
2.2. 더 간단한 소스코드
def solution(price, money, count):
return max (price*count*(count+1)/2 - money, 0)