2 solutions
-
1
#include <iostream> using namespace std; int main() { int n; cin >> n; int count = 0; for (int i = 0; i < n; i++) { int num; cin >> num; int a = num % 10; int b = (num / 10) % 10; int c = (num / 100) % 10; int d = num / 1000; if (a - d - b - c > 0) { count++; } } cout << count << endl; return 0; }
- 1
Information
- ID
- 6883
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 1
- Tags
- # Submissions
- 10
- Accepted
- 7
- Uploaded By