4 条题解

  • 1
    @ 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;
    }
    
    • 1
      @ 2023-9-3 11:08:09
      #include<iostream>
      using namespace std;
      int main(){ //C++12级_整数的位数
      	string s;
      	cin>>s;
      	cout<<s.length();
      	return 0;
      }
      
      • 1
        @ 2023-4-13 9:56:49
        • 0
          @ 2025-8-23 15:25:26

          • 1

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

          信息

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