Submission details
Task:Vuodet
Sender:MojoLake
Submission time:2025-09-07 01:15:23 +0300
Language:C++ (C++20)
Status:READY
Result:100
Feedback
groupverdictscore
#1ACCEPTED100
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#2ACCEPTED0.00 sdetails
#3ACCEPTED0.00 sdetails

Code

#include <bits/stdc++.h>

#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()

using namespace std;
using ll = long long;

const int inf = 1e9;
const ll LLinf = 1e18;
constexpr int leet = 1337;

bool ok(int x) {
    int y = x * leet;

    while (y > 0) {
        if (y % 10 == x % 10) {
            x /= 10;
        }
        y /= 10;
    }

    return x == 0;
}

int main() {
    cin.tie(0)->sync_with_stdio(0);
    int a, b;
    cin >> a >> b;
    vector<int> ans;
    for (int i = a; i <= b; ++i) {
        if (ok(i)) ans.push_back(i);
    }

    cout << sz(ans) << "\n";
    for (int x : ans ) cout << x << "\n";
}

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