| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123545 | 王镜铭 | 12满足条件的四位数 | C++ | Compile Error | 0 MS | 0 KB | 208 | 2025-07-06 12:05:04 |
#include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int s,d=0; for(x=0;x<=a;x++){ cin>>d; for(d%10-d/1000-d/100%10-d/10%10>0){ d++; } } cout<<d; return 0; }
Main.cc: In function 'int main()':
Main.cc:7:6: error: 'x' was not declared in this scope
for(x=0;x<=a;x++){
^
Main.cc:9:37: error: expected ';' before ')' token
for(d%10-d/1000-d/100%10-d/10%10>0){
^
Main.cc:9:35: warning: statement has no effect [-Wunused-value]
for(d%10-d/1000-d/100%10-d/10%10>0){
^
Main.cc:12:2: error: expected primary-expression before '}' token
}
^
Main.cc:12:2: error: expected ';' before '}' token
Main.cc:12:2: error: expected primary-expression before '}' token
Main.cc:12:2: error: expected ')' before '}' token
Main.cc:12:2: error: expected primary-expression before '}' token
Main.cc:6:6: warning: unused variable 's' [-Wunused-variable]
int s,d=0;
^