为什么我只有20分,哪位大佬帮忙看看?

lyh198 波风水门 2024-09-15 14:45:01 8

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

{{ vote && vote.total.up }}