fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int n = 0;
  6. int a = 3;
  7.  
  8. while (a <= 10000)
  9. {
  10. a=2*a-1;
  11. n=n+1;
  12. }
  13.  
  14. printf("初めて10000を超えるときのa%d = %d\n", n, a);
  15.  
  16. return 0;
  17. }
Success #stdin #stdout 0s 5280KB
stdin
Standard input is empty
stdout
初めて10000を超えるときのa13 = 16385