fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. long double d = 0;
  7. for (double n = 2; n < 100000000; n++) {
  8. d += 1/pow(n, 2);
  9. }
  10. std::cout << d << endl;
  11. return 0;
  12. }
Success #stdin #stdout 0.99s 3460KB
stdin
Standard input is empty
stdout
0.644934