3 条题解

  • 0
    @ 2023-9-3 11:09:24
    #include<iostream>
    using namespace std;
    int main(){ //C++12级_整数的位数
    	int n,w=0;
    	cin>>n;
    	while(n){
    		n/=10;
    		w++;
    	}
    	cout<<w;
    	return 0;
    }
    
    • 0
      @ 2023-9-3 11:08:09
      #include<iostream>
      using namespace std;
      int main(){ //C++12级_整数的位数
      	string s;
      	cin>>s;
      	cout<<s.length();
      	return 0;
      }
      
      • 0
        @ 2023-4-13 9:56:49
        • 1

        蓝桥杯编程等级考试C++12级_整数的位数

        信息

        ID
        569
        时间
        1000ms
        内存
        256MiB
        难度
        8
        标签
        递交数
        12
        已通过
        10
        上传者