6035 | 2023-10-28 16:49:44 | Gervid | Szorzás gyakorlás | cpp11 | Accepted 100/100 | 3ms | 4128 KiB |
#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
using namespace std;
int main()
{
int n, i, k, temp, out, current;
cin >> n;
set<int> nums;
for (i = 0; i < n; i++)
{
cin >> k;
nums.clear();
current = 0, out = 0;
while (nums.size() < 10)
{
current += k;
temp = current;
while (temp > 0)
{
nums.insert(temp % 10);
temp /= 10;
}
out++;
}
cout << out << endl;
}
}
//3
//5
//10
//3
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1684 KiB | ||||
2 | Accepted | 3ms | 1864 KiB | ||||
subtask2 | 15/15 | ||||||
3 | Accepted | 3ms | 2076 KiB | ||||
subtask3 | 25/25 | ||||||
4 | Accepted | 3ms | 2308 KiB | ||||
5 | Accepted | 3ms | 2408 KiB | ||||
6 | Accepted | 3ms | 2648 KiB | ||||
7 | Accepted | 3ms | 2888 KiB | ||||
8 | Accepted | 3ms | 2968 KiB | ||||
9 | Accepted | 3ms | 3064 KiB | ||||
10 | Accepted | 3ms | 3064 KiB | ||||
11 | Accepted | 3ms | 3064 KiB | ||||
subtask4 | 20/20 | ||||||
12 | Accepted | 3ms | 3128 KiB | ||||
13 | Accepted | 3ms | 3248 KiB | ||||
subtask5 | 40/40 | ||||||
14 | Accepted | 3ms | 3344 KiB | ||||
15 | Accepted | 3ms | 3432 KiB | ||||
16 | Accepted | 3ms | 3668 KiB | ||||
17 | Accepted | 3ms | 3780 KiB | ||||
18 | Accepted | 3ms | 3636 KiB | ||||
19 | Accepted | 3ms | 3636 KiB | ||||
20 | Accepted | 3ms | 3884 KiB | ||||
21 | Accepted | 3ms | 4128 KiB | ||||
22 | Accepted | 3ms | 3988 KiB | ||||
23 | Accepted | 3ms | 4116 KiB |