6015 | 2023-10-22 16:37:30 | Boldi | Szorzás gyakorlás | cpp17 | Time limit exceeded 0/100 | 1.085s | 4460 KiB |
#include<bits/stdc++.h>
using namespace std;
int solve(int a)
{
bool nums[10];
int cnt=0, m=0;
while(cnt!=10){
m++;
int x=a*m;
while(x>0){
if(!nums[x%10]){
cnt++;
nums[x%10]=true;
}
x/=10;
}
}
return m;
}
int main()
{
int n; cin>>n;
for(int i=0;i<n;i++){
int x; cin>>x;
cout<<solve(x)<<endl;
}
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Time limit exceeded | 1.065s | 1848 KiB | ||||
2 | Time limit exceeded | 1.037s | 2096 KiB | ||||
subtask2 | 0/15 | ||||||
3 | Time limit exceeded | 1.069s | 2300 KiB | ||||
subtask3 | 0/25 | ||||||
4 | Time limit exceeded | 1.052s | 2336 KiB | ||||
5 | Time limit exceeded | 1.049s | 2856 KiB | ||||
6 | Time limit exceeded | 1.065s | 2564 KiB | ||||
7 | Time limit exceeded | 1.065s | 2760 KiB | ||||
8 | Time limit exceeded | 1.065s | 2832 KiB | ||||
9 | Time limit exceeded | 1.065s | 3088 KiB | ||||
10 | Time limit exceeded | 1.042s | 3332 KiB | ||||
11 | Time limit exceeded | 1.069s | 3484 KiB | ||||
subtask4 | 0/20 | ||||||
12 | Time limit exceeded | 1.054s | 3268 KiB | ||||
13 | Time limit exceeded | 1.08s | 3272 KiB | ||||
subtask5 | 0/40 | ||||||
14 | Time limit exceeded | 1.054s | 2632 KiB | ||||
15 | Time limit exceeded | 1.06s | 3376 KiB | ||||
16 | Time limit exceeded | 1.06s | 2728 KiB | ||||
17 | Time limit exceeded | 1.057s | 3476 KiB | ||||
18 | Time limit exceeded | 1.057s | 3708 KiB | ||||
19 | Time limit exceeded | 1.074s | 4076 KiB | ||||
20 | Time limit exceeded | 1.049s | 4088 KiB | ||||
21 | Time limit exceeded | 1.052s | 4316 KiB | ||||
22 | Time limit exceeded | 1.072s | 4432 KiB | ||||
23 | Time limit exceeded | 1.085s | 4460 KiB |