Navi is at the Beer Bar where he has ordered N beers. After seeing his love with the beers, Bar's Manager has decided to make as much money as they can by asking Navi to pay K * i3 Rupees for the ith beer. But Navi has only M Rupees in his purse. So you are required to lent him some money so that he can still be able to pay for all of the N beers.
Input:
Output:
Sample Code:
#include <iostream>
using namespace std;
int main()
{
//taking input for number of test cases, T.
cin>>T;
//For every test case, taking input for N , K and M.
cin>>N>>K>>M;
//let the answer be in variable **Ans**
cout << Ans << endl; //print your answer for every test case.
return 0;
}
Total Money required is : 2 * 13 + 2 * 23 = 18 but he already has 10 so ans is 8.