fork download
  1. #include <cstdio>
  2. #include <iostream>
  3. #include <cstring>
  4. #include <cmath>
  5. #include <algorithm>
  6. #include <fstream>
  7.  
  8. #define rep( i, l, r ) for (int i = l; i <= r; i++)
  9. #define down( i, l, r ) for (int i = l; i >= r; i--)
  10.  
  11. using namespace std;
  12.  
  13. int main()
  14. {
  15. int m;
  16. scanf("%d",&m);
  17. printf("%d\n",int(log2(m))+1);
  18. return 0;
  19. }
Success #stdin #stdout 0s 3300KB
stdin
3
stdout
2