| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 146489 | 孔声豪 | 各个位数之和 | C++ | Compile Error | 0 MS | 0 KB | 126 | 2026-01-29 10:38:04 |
#include<iostream> int n,m; m=0; cin>>n; while(n!=0){ m+=n%10; n/=10; } cout<<m<<endl; return 0; }
Main.cc:3:1: error: 'm' does not name a type
m=0;
^
Main.cc:4:1: error: 'cin' does not name a type
cin>>n;
^
Main.cc:5:1: error: expected unqualified-id before 'while'
while(n!=0){
^
Main.cc:9:1: error: 'cout' does not name a type
cout<