| Task: | Vuodet |
| Sender: | Mahtimursu |
| Submission time: | 2025-09-07 18:48:58 +0300 |
| Language: | C++ (C++20) |
| 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 <bits/stdc++.h>
typedef long long ll;
#define M 1000000007
#define N (1 << 18)
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int a, b;
cin >> a >> b;
vector<string> ans;
for (int i = a; i <= b; ++i) {
string num = to_string(i);
string num2 = to_string(i * 1337);
int j = 0;
for (int k = 0; k < (int)num2.length(); ++k) {
if (j == (int)num.length()) break;
if (num[j] == num2[k]) j++;
}
if (j == (int)num.length()) ans.push_back(num);
}
cout << ans.size() << endl;
for (string x : ans) {
cout << x << 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 |
