Task: | Vuodet |
Sender: | Laakeri |
Submission time: | 2025-09-06 18:39:40 +0300 |
Language: | C++ (C++11) |
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> #define F first #define S second typedef long long ll; using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int a,b; cin>>a>>b; vector<int> ans; for (int i=a;i<=b;i++){ int lol=i*1337; string s=to_string(lol); string u=to_string(i); int t=0; for (char c : s){ if (t==0&&c==u[0]){ t++; } else if (t==1&&c==u[1]){ t++; } else if (t==2&&c==u[2]){ t++; } else if (t==3&&c==u[3]){ t++; } } if (t==4){ ans.push_back(i); } } cout<<ans.size()<<endl; for (int x : ans){ cout<<x<<endl; } }
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 |