3 条题解

  • 3
    @ 2026-8-27 11:26:55
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        string s;
        getline(cin,s);
        int count=0;
        for(int i=0;i<s.length();i++){
            if(s[i]!=' '){
                count++;
            }
        }
        cout<<count<<endl;
        return 0;
    }
    
  • 0
    @ 2026-8-28 9:26:35
    #include<bits/stdc++.h>
    using namespace std;
    char s;
    int sum=0;
    int main(){
        while(cin>>s)sum++;
        cout<<sum;
    }
    
    • 0
      @ 2026-8-27 22:59:32

      艺术就是爆炸!!!!!!!

      #include<stdio.h>
      #include<string.h>
      int main(){
          char s[10]={0};
          scanf("%[^\n]",s);
          int len=strlen(s),len1=len;
          for(int i=0;i<=len-1;i++){
              if(s[i]==' '){
                  len1--;
              }
          }
          printf("%d",len1);
          return 0;
      }
      
      • 1

      【深基6.例5】[NOIP2018 普及组] 标题统计

      信息

      ID
      154
      时间
      1000ms
      内存
      256MiB
      难度
      5
      标签
      递交数
      161
      已通过
      57
      上传者