117792024-11-10 16:38:45MittomenSzorzás gyakorláscpp17Wrong answer 0/1001.098s568 KiB
#include <iostream>
#include <string>
#include <cstdint>
#include <bitset>

using namespace std;

void get_solution(uint32_t k) {
	bitset<10> set;
	int i = 1;


	while (!set.all()) {
		for (char& chr : to_string(k* i)) {
			set.set(chr - '0');
		}
		
		i++;
	}

	cout << i - 1 << endl;
}

int main() {
	uint8_t n;

	cin >> n;

	uint32_t k;
	for (uint8_t i = 0; i < n; i++) {
		cin >> k;

		get_solution(k);
	}

	return 0;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer1ms320 KiB
2Wrong answer1ms508 KiB
subtask20/15
3Time limit exceeded1.098s320 KiB
subtask30/25
4Wrong answer2ms408 KiB
5Wrong answer1ms500 KiB
6Wrong answer1ms320 KiB
7Wrong answer1ms320 KiB
8Wrong answer1ms320 KiB
9Wrong answer1ms568 KiB
10Wrong answer1ms320 KiB
11Wrong answer1ms320 KiB
subtask40/20
12Time limit exceeded1.098s320 KiB
13Time limit exceeded1.098s320 KiB
subtask50/40
14Time limit exceeded1.087s500 KiB
15Time limit exceeded1.087s320 KiB
16Time limit exceeded1.087s320 KiB
17Time limit exceeded1.087s320 KiB
18Time limit exceeded1.082s320 KiB
19Time limit exceeded1.082s512 KiB
20Time limit exceeded1.082s320 KiB
21Time limit exceeded1.082s320 KiB
22Time limit exceeded1.07s500 KiB
23Time limit exceeded1.07s320 KiB