Gupta, Chaturvedi, and Saxena are very close friends and they are on a Goa trip. One night, they went to a famous bar of Goa. In the bar they saw that beer bottles were arranged in a long row. Every beer bottle had some price tag and these prices followed arithmetic progression. Gupta who was standing near the 116th bottle said that the total price of all the bottles upto 116th bottle is Rs. 220922 while Chaturvedi who was standing near 343rd bottle said that the total price of all the beer bottles upto 343rd bottle is Rs. 1937950. Now they asked Saxena what will be the total price of all the beer bottles upto the 11631th bottle ?
Output the total price of all the bottles upto 11631th bottle.
Example:
Output: 2232012162
Approach
C++
#include <bits/stdc++.h>using namespace std;int main(){string res = "2232012162";cout << res << "\n";return 0;}
No comments:
Post a Comment