OI-Codes/XSM OJ 重庆小码王集团OJ/判断正整数位数.cpp
2024-02-15 22:38:30 +08:00

19 lines
172 B
C++

#include <iostream>
using namespace std;
int main(){
int a,b=0;
cin >>a;
if(a==0){
cout <<"1";
return 0;
}
while(a){
a/=10;
b++;
}
cout <<b;
return 0;
}