两种解法
2025-04-20 11:59:40
发布于:广东
0阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
cin>>s;
cout<<s.size();
return 0;
}
或
#include<bits/stdc++.h>
using namespace std;
int a,num;
int main(){
cin>>a;
while(a){
num++;
a/=10;
}
cout<<num;
return 0;
}
这里空空如也
有帮助,赞一个