fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a = 1;
  6. int n = 0;
  7.  
  8. while (a <= 10000)
  9. {
  10. if (a >= 100)
  11. {
  12. n++;
  13. }
  14.  
  15. a = 2 * a + 1;
  16. }
  17.  
  18. printf("%d\n", n);
  19.  
  20. return 0;
  21. }
  22.  
Success #stdin #stdout 0s 5320KB
stdin
stdout
7