11799 | 2024-11-11 13:40:06 | Leventusz09 | Szorzás gyakorlás | cpp17 | Accepted 100/100 | 1ms | 592 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
vector<string> K(N);
for(int i=0; i<N; i++){
cin >> K[i];
vector<bool> ds(10);
string str = K[i];
int o = 1;
bool done = false;
while(!done){
for(char ch : str) ds[ch - 48] = true;
done = true; for(bool x : ds) if(!x){ done=false; break; }
if(!done) str = to_string(stoll(K[i])*o), o++;
}
cout << o - 1 << "\n";
}
return 0;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 1ms | 320 KiB | ||||
2 | Accepted | 1ms | 320 KiB | ||||
subtask2 | 15/15 | ||||||
3 | Accepted | 1ms | 320 KiB | ||||
subtask3 | 25/25 | ||||||
4 | Accepted | 1ms | 508 KiB | ||||
5 | Accepted | 1ms | 508 KiB | ||||
6 | Accepted | 1ms | 320 KiB | ||||
7 | Accepted | 1ms | 320 KiB | ||||
8 | Accepted | 1ms | 320 KiB | ||||
9 | Accepted | 1ms | 320 KiB | ||||
10 | Accepted | 1ms | 320 KiB | ||||
11 | Accepted | 1ms | 320 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 1ms | 320 KiB | ||||
13 | Accepted | 1ms | 320 KiB | ||||
subtask5 | 40/40 | ||||||
14 | Accepted | 1ms | 508 KiB | ||||
15 | Accepted | 1ms | 320 KiB | ||||
16 | Accepted | 1ms | 324 KiB | ||||
17 | Accepted | 1ms | 320 KiB | ||||
18 | Accepted | 1ms | 592 KiB | ||||
19 | Accepted | 1ms | 408 KiB | ||||
20 | Accepted | 1ms | 320 KiB | ||||
21 | Accepted | 1ms | 508 KiB | ||||
22 | Accepted | 1ms | 320 KiB | ||||
23 | Accepted | 1ms | 320 KiB |