fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. int i = 1;
  7. double sum = 0;
  8. while (i <= 2025) {
  9.  
  10. sum += 1/sqrt(i);
  11. i++;
  12. }
  13. cout << sum * sum;
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
7841.24