Task: | Vuodet |
Sender: | Grez |
Submission time: | 2025-09-05 21:15:55 +0300 |
Language: | C++ (C++17) |
Status: | READY |
Result: | 100 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 100 |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.00 s | details |
#2 | ACCEPTED | 0.00 s | details |
#3 | ACCEPTED | 0.00 s | details |
Code
#include <iostream> #include <list> using namespace std; int main() { int year; int ey; list<int> years = {}; cin >> year; cin >> ey; for (; year<=ey; year++) { int leet = 1337*year; int y = year; while (leet>0) { if (leet%10 == y%10) {y/=10;} leet /= 10; } if (y==0) { years.push_back(year); } } cout << years.size() << endl; for (int yy : years) { cout << yy << endl; } return 0; }
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1600 2400 |
correct output |
---|
6 1625 2000 2025 2050 ... |
user output |
---|
6 1625 2000 2025 2050 ... |
Test 2
Verdict: ACCEPTED
input |
---|
1773 1773 |
correct output |
---|
0 |
user output |
---|
0 |
Test 3
Verdict: ACCEPTED
input |
---|
2025 2025 |
correct output |
---|
1 2025 |
user output |
---|
1 2025 |