Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
123548 王镜铭 12满足条件的四位数 C++ Compile Error 0 MS 0 KB 250 2025-07-06 12:07:27

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:58: error: expected ';' before ')' token
   for (s % 10 - s / 1000 - s / 100 % 10 - s / 10 % 10 > 0) {
                                                          ^
Main.cc:9:55: warning: statement has no effect [-Wunused-value]
   for (s % 10 - s / 1000 - s / 100 % 10 - s / 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