| Task: | Numerot |
| Sender: | Lieska |
| Submission time: | 2020-10-16 22:58:01 +0300 |
| Language: | C++ (C++17) |
| Status: | READY |
| Result: | 0 |
| group | verdict | score |
|---|---|---|
| #1 | WRONG ANSWER | 0 |
| #2 | WRONG ANSWER | 0 |
| #3 | WRONG ANSWER | 0 |
| test | verdict | time | group | |
|---|---|---|---|---|
| #1 | WRONG ANSWER | 0.49 s | 1, 2, 3 | details |
| #2 | WRONG ANSWER | 0.49 s | 2, 3 | details |
| #3 | RUNTIME ERROR | 0.49 s | 3 | details |
Code
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int t[10101010], ans[1111000], k[10];
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
//Älä käytä, jos tehtävä on interaktiivinen!
int n;
cin >> n;
k[0]=1;
for (int i=1; i<=7; ++i) k[i]=k[i-1]*10;
for (int i=1; i<=10000000; ++i){
int a=0;
for (int j=1; j<=7; ++j){
a = max(a, (i/k[j-1]%k[j]));
}
/*string s=to_string(i);
for (auto u:s){
a = max(a, u-'0');
}*/
t[i]=t[i-a]+1;
if (t[i]>t[i-1] && t[i]<=1000000) ans[t[i]]=i;
}
for (int i=1; i<=n; ++i){
int a;
cin >> a;
cout << ans[a] << "\n";
}
}
Test details
Test 1
Group: 1, 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000 1 2 3 4 ... |
| correct output |
|---|
| 1 10 11 20 22 ... |
| user output |
|---|
| 1 10 11 20 22 ... Truncated |
Test 2
Group: 2, 3
Verdict: WRONG ANSWER
| input |
|---|
| 1000 224995 413660 249827 2125 ... |
| correct output |
|---|
| 1731724 3216040 1940719 14585 532612 ... |
| user output |
|---|
| 0 0 0 1047685 0 ... Truncated |
Test 3
Group: 3
Verdict: RUNTIME ERROR
| input |
|---|
| 1000 627887018110416188 785474884983906653 653772166720939773 784335285960673683 ... |
| correct output |
|---|
| 5530371754830260284 6918696171534226533 5757755627065159149 6908439780325129803 3223801064342340738 ... |
| user output |
|---|
| (empty) |
