2 条题解

  • 2
    @ 2026-2-4 10:37:53
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
      char x;
    //接收单个字符,包括单个空格。
      int sum=0;
      while(cin>>x)
      	if(x>='0'&&x<='9') sum++;
      cout<<sum;
      return 0;
    }
    
    • 0
      @ 2026-2-4 10:37:26
      #include<bits/stdc++.h>
      using namespace std;
      int main(){
        char x;
      //接收单个字符,包括单个空格。
        int sum=0;
        while(cin>>x)
        	if(x>='0'&&x<='9') sum++;
        cout<<sum;
        return 0;
      }
      
      • 1

      信息

      ID
      285
      时间
      1000ms
      内存
      128MiB
      难度
      5
      标签
      递交数
      130
      已通过
      48
      上传者