Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
130336 李亭绪 12满足条件的四位数 C++ Compile Error 0 MS 0 KB 218 2025-09-11 19:55:19

Tests(0/0):


Code:

#include <iostream> using namespace std; int main(){ int n,a,i; int SUM=0; cin>>n; for(i=0;i<n;i++){ cin>>a; g= a%10; s=(a/10)%10; b=(a/100)%10; q=(a/1000)%10; if(g-q-b-s>0){ SUM++;} cout << SUM << endl;}


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:1: error: 'g' was not declared in this scope
 g= a%10;
 ^
Main.cc:10:1: error: 's' was not declared in this scope
 s=(a/10)%10;
 ^
Main.cc:11:1: error: 'b' was not declared in this scope
 b=(a/100)%10;
 ^
Main.cc:12:1: error: 'q' was not declared in this scope
 q=(a/1000)%10;
 ^
Main.cc:15:21: error: expected '}' at end of input
 cout << SUM << endl;}
                     ^