| 记录编号 | 554699 | 评测结果 | AAAAAAAAAAAAAAAAWAWA | ||
|---|---|---|---|---|---|
| 题目名称 | 3049.[NOIP 2018PJ]标题统计 | 最终得分 | 90 | ||
| 用户昵称 | 是否通过 | 未通过 | |||
| 代码语言 | C++ | 运行时间 | 0.000 s | ||
| 提交时间 | 2020-09-19 09:42:31 | 内存使用 | 0.00 MiB | ||
#include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main(){
freopen("title.in","r",stdin);
freopen("title.out","w",stdout);
char a[6];
gets(a);
int i=1;
int max=1;
while (a[i]!=0)
{i++;
max++;
}
int n=0;
n=strlen(a);
for(int j=1;j<=n;j++)
{
if(a[j]==' ')
max=max-1;
}cout<<max;
}