60352023-10-28 16:49:44GervidSzorzás gyakorláscpp11Accepted 100/1003ms4128 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
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1684 KiB
2Accepted3ms1864 KiB
subtask215/15
3Accepted3ms2076 KiB
subtask325/25
4Accepted3ms2308 KiB
5Accepted3ms2408 KiB
6Accepted3ms2648 KiB
7Accepted3ms2888 KiB
8Accepted3ms2968 KiB
9Accepted3ms3064 KiB
10Accepted3ms3064 KiB
11Accepted3ms3064 KiB
subtask420/20
12Accepted3ms3128 KiB
13Accepted3ms3248 KiB
subtask540/40
14Accepted3ms3344 KiB
15Accepted3ms3432 KiB
16Accepted3ms3668 KiB
17Accepted3ms3780 KiB
18Accepted3ms3636 KiB
19Accepted3ms3636 KiB
20Accepted3ms3884 KiB
21Accepted3ms4128 KiB
22Accepted3ms3988 KiB
23Accepted3ms4116 KiB