fork download
  1. #include <stdio.h>//thu voi 1000 bi loi
  2. #include <stdlib.h>
  3. #include<math.h>
  4.  
  5. int main()
  6. {
  7. int a,i,max,t;
  8. scanf("%d",&a);
  9. for(i=1;i<=20;i++){
  10. max=a/pow(10,i);
  11. if(abs(max)<=9&& abs(max)>=1){
  12. t=i+1;
  13. }
  14.  
  15. }
  16. printf("%d",t);
  17.  
  18. }
Success #stdin #stdout 0s 4488KB
stdin
1000
stdout
4