Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123566 赵梓渊 12满足条件的四位数 C++ Compile Error 0 MS 0 KB 220 2025-07-06 12:46:32

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n, a, c = 0 ; cin >> n; for (int i = 1; i <= n; i++) { cin >> a; if (a % 10 -a / 1000 -a % 1000 / 100 -a % 1000 % 100 / 10 > 0) c++; } cout << c; return 0; }


Run Info:

Main.cc:1:25: warning: extra tokens at end of #include directive
 #include using namespace std; int main() { int n, a, c = 0 ; cin >> n; for (int i = 1; i <= n; i++) { cin >> a; if (a % 10 -a / 1000 -a % 1000 / 100 -a % 1000 % 100 / 10 > 0) c++; } cout << c; return 0; } 
                         ^
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status