Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102561 | 杨政翰 | 15几个数字组成 | C++ | Compile Error | 0 MS | 0 KB | 353 | 2024-12-22 09:55:15 |
#include <iostream> using namespace std; int main() { int n = 0; int cnt = 0; cin >>n; if(n < 0) n = -n; else if(n == 0) cnt = 1; while(n != 0) } ++cnt; n/= 10; } cont << cnt << endl; return 0; }
Main.cc: In function 'int main()': Main.cc:11:9: error: expected primary-expression before '}' token } ^ Main.cc: At global scope: Main.cc:12:18: error: expected unqualified-id before '++' token ++cnt; ^ Main.cc:13:18: error: 'n' does not name a type n/= 10; ^ Main.cc:14:9: error: expected declaration before '}' token } ^