Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
119281 | 令狐悦然 | 12满足条件的四位数 | C++ | Compile Error | 0 MS | 0 KB | 301 | 2025-05-17 12:34:37 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,m,num=0; cin>>n; for(int i = 1;i<= n;i++){ cin>>m; g = m % 10; s = m / 10 % 10; b = m / 100 % 10; q = m / 1000; if(g-s-b-q>0){ num+=1; } } cout<<num; return 0; }
Main.cc: In function 'int main()': Main.cc:11:5: error: 'g' was not declared in this scope g = m % 10; ^ Main.cc:12:5: error: 's' was not declared in this scope s = m / 10 % 10; ^ Main.cc:13:5: error: 'b' was not declared in this scope b = m / 100 % 10; ^ Main.cc:14:5: error: 'q' was not declared in this scope q = m / 1000; ^