| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123876 | 陈华仁星 | 12满足条件的四位数 | C++ | Compile Error | 0 MS | 0 KB | 270 | 2025-07-10 14:29:26 |
#include <iostream> using namespace std; int main() { int n,m,cnt=0; scanf("%d",&n); for(int i=1;i<=n;i++) { scanf("%d",&m); a=m%10; b=m/10%10; c=m/100%10; d=m/1000; if(a-d-c-b>0) { cnt++; } } printf("%d",cnt); return 0; }
Main.cc: In function 'int main()':
Main.cc:11:3: error: 'a' was not declared in this scope
a=m%10;
^
Main.cc:12:3: error: 'b' was not declared in this scope
b=m/10%10;
^
Main.cc:13:3: error: 'c' was not declared in this scope
c=m/100%10;
^
Main.cc:14:3: error: 'd' was not declared in this scope
d=m/1000;
^
Main.cc:7:16: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&n);
^
Main.cc:10:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&m);
^