| 10 | #define dd double |
| 11 | using namespace std; |
| 12 | int main() { |
| 13 | ios::sync_with_stdio(false); |
| 14 | ll n, m, k; cin >> n >> m >> k; |
| 15 | ll sum = 0; |
| 16 | for (ll i = 1; i <= k; i++) { |
| 17 | sum += n * i; |
| 18 | } |
| 19 | sum -= m; |
| 20 | if (sum <= 0) { |
| 21 | cout << "0" << endl; |
| 22 | } |
| 23 | else { |
| 24 | cout << sum << endl; |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected