| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150166 | 杨金卓 | 各个位数之和 | C++ | Wrong Answer | 1 MS | 276 KB | 203 | 2026-03-22 20:41:18 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,a=0,b=0; cin>>n; while(true){ if(n/10==0){ break; } n/=10; scanf("%1d",&a); b+=a; } cout<<b; return 0; }
------Input------
22222
------Answer-----
10
------Your output-----
0