Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. long long a[2018];
  8. long long f = 0;
  9. a[0] = 1;
  10.  for (int x = 1; x <= 2017; ++x){
  11.     a[x] = a[x-1] + 1;
  12.  }
  13. for (int y = 0; y <= 2015; ++y){
  14.     long long tmp = a[y] * a[y + 1] * a[y + 2];
  15.     cout << tmp << endl;
  16.     f += tmp;
  17. }
  18. cout.precision(20);
  19. cout << cout.fixed << (double) sqrt(4 * f);
  20.      return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement