fork download
  1. #include <bits/stdc++.h>
  2.  
  3. long double prob[120][70];
  4.  
  5. int main()
  6. {
  7. prob[0][0]=1;
  8. for(int i=1; i<=110; ++i){
  9. for(int j=1; j<=64; ++j){
  10. prob[i][j] = prob[i-1][j-1] * (1. - pow(2., j-1)*1./pow(2., 64)) +
  11. prob[i-1][j] * (pow(2., j)*1.0 / pow(2., 64));
  12. }
  13. }
  14. printf("%.100Lf\n", pow(prob[110][64], 1000));
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 16176KB
stdin
Standard input is empty
stdout
0.9999999999999716892044518412596687539917184039950370788574218750000000000000000000000000000000000000