返回题解分享
讨论 / 题解分享/ 帖子详情

作文标题改 - 题解

#include <bits/stdc++.h>
using namespace std;
int main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	string n;
	string s;
	getline(cin,n);
	getline(cin,s);
	int n1 = stoi(n);
	int count = 0;
	for(int i = 0; i < n1; i++){
		if(s[i] != ' '){
			count++;
		}
	}
	cout << count << endl;
	
	
	
	return 0;
 }
0 回复 0 转发 1 喜欢 2 阅读
回复 (0)
默认 最新
暂无回复,快来抢沙发!