fork download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. double long testfact(int),k,frac,test;
  7. for(k=1;k>0;k++)
  8. {
  9. frac=testfact(k)-long(testfact(k));
  10. if(long(pow(10,frac))==9)
  11. {
  12. cout<<k;
  13. break;
  14. }
  15. }
  16. return 0;
  17. }
  18. double long testfact(int x)
  19. {
  20. return x==1 ? 0 : log10(x)+testfact(x-1);
  21. }
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
96