https://school.programmers.co.kr/learn/courses/30/lessons/82612#
class Solution {
public long solution(int price, int money, int count) {
long cost = 0;
for(int i = 1; i <= count; i++){
cost += (long) price * i;
}
long answer = cost - money;
if(money >= cost) {
answer = 0;
}
return answer;
}
}