fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int x=1,n=1;
  5. while(x<1000){
  6. x=2*x+1;
  7. n++;
  8. }
  9. printf("%d",n);
  10. return 0;
  11. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
10