| 记录编号 | 592120 | 评测结果 | AAAAAAAAAAAAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 3285.[CSP 2019J]数字游戏 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.061 s | ||
| 提交时间 | 2024-07-21 10:41:02 | 内存使用 | 3.34 MiB | ||
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
freopen("csp2019pj_number.in","r",stdin);
freopen("csp2019pj_number.out","w",stdout);
char s[8];cin>>s;
int n=0;
for(int i=0;i<=8;i++)
{if(s[i]=='1') n=n+1;}
cout<<n;
}