16 条题解

  • 0
    @ 2026-1-23 16:30:50

    #include<bits/stdc++.h> using namespace std;

    int main(){ ios::sync_with_stdio(false); cin.tie(0);

    int cnt=0;
    string t;
    getline(cin,t);
    int n= stoi(t);
    string s;
    getline(cin,s);
    
    for(int i=0;i<n;i++){
    	if(s[i]!=' '){
    		cnt++;
    		
    	}
    	
    }
    cout<<cnt<<'\n';
    return 0;
    

    }

    信息

    ID
    12
    时间
    1000ms
    内存
    256MiB
    难度
    1
    标签
    递交数
    2944
    已通过
    727
    上传者