✔ 문제
✔ 해결
class Solution {
public long solution(int price, int money, int count) {
long answer = 0, sub_answer = 0;
for(int i = 0; i <= count; i++) {
sub_answer += (price * i);
}
if(sub_answer < money) {
answer = 0;
}else {
answer = sub_answer - money;
}
return answer;
}
}