[题解]NOIP2018(普及组)T1标题统计(title)

NOIP2018(普及组)T1标题统计(title) 题解

[题解]NOIP2018(普及组)T1标题统计(title)

[代码(AC)]

 #include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <algorithm>
using namespace std;
char s[];
int main (){
gets(s);
int len=strlen(s);
int ans=;
for(int i=;i<len;++i){
if(s[i]!=' '&&s[i]!='\n')++ans;
}
printf("%d",ans);
return ;
}

2018-11-18 10:13:03

上一篇:ios 汉字字符串数组拼音排序


下一篇:【IOS】模仿windowsphone列表索引控件YFMetroListBox