Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- long long a[2018];
- long long f = 0;
- a[0] = 1;
- for (int x = 1; x <= 2017; ++x){
- a[x] = a[x-1] + 1;
- }
- for (int y = 0; y <= 2015; ++y){
- long long tmp = a[y] * a[y + 1] * a[y + 2];
- cout << tmp << endl;
- f += tmp;
- }
- cout.precision(20);
- cout << cout.fixed << (double) sqrt(4 * f);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement