fork download
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int a=3; //初めて10000を超えるまで進める
  5. while(a<=10000)
  6. {
  7. a=2*a-1;
  8. }
  9. //この時点でaは初めて10000を超えるまで進める
  10. //a_{n+1}をそのまま1行で計算して出す
  11. printf("そのときのa_{n+1}=%d\n",2*a-1);
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
そのときのa_{n+1}=32769