fork download
  1. #include <stdio.h>
  2. #include <math.h>
  3.  
  4. int main() {
  5. int n;
  6. int i;
  7. i = 1;
  8. scanf("%d", &n);
  9. while ( pow(2, i) <= n)
  10. {
  11. printf("%d", i);
  12. i++;
  13. }
  14. return 0;
  15. }
Success #stdin #stdout 0s 5412KB
stdin
128
stdout
1234567