Bleatrix Trotter the sheep has devised a strategy that helps her fall asleep faster. First, she picks a number N. Then she starts naming N, 2 × N, 3 × N, and so on.
Whenever she names a number, she thinks about all of the digits in that number. She keeps track of which digits (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) she has seen at least once so far as part of any number she has named. Once she has seen each of the ten digits at least once, she will fall asleep.
Bleatrix must start with N and must always name (i + 1) × N directly after i × N.
For example, suppose that Bleatrix picks N = 1692. She would count as follows:

N = 1692. Now she has seen the digits 1, 2, 6, and 9.
2N = 3384. Now she has seen the digits 1, 2, 3, 4, 6, 8, and 9.
3N = 5076. Now she has seen all ten digits, and falls asleep.

The purpose of this kata is to return the last number Bleatrix Trotter sees before falling asleep.
Input
Will always be positive integer or zero

Output
The last number Bleatrix Trotter sees or "INSOMNIA" (-1 in Rust and C++) if she will count forever

Please note, this challenge is not my idea. It's from Google Code Jam 2016

Source: codewars | Difficulty: EASY

Starter code: def trotter(n):
	

Solutions:
def trotter(n):
	(i, numStr, numList) = (0, '', ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'])
	if n == 0:
		return 'INSOMNIA'
	while all([i in numStr for i in numList]) != True:
		i += 1
		numStr = numStr + str(n * i)
	return i * n


def trotter(k):
	if k == 0:
		return 'INSOMNIA'
	(n, d) = (k, set(str(k)))
	while len(d) < 10:
		(n, d) = (n + k, d | set(str(n + k)))
	return n


def trotter(n):
	if n == 0:
		return 'INSOMNIA'
	(seen, current) = (set(str(n)), n)
	while len(seen) < 10:
		current += n
		seen.update(str(current))
	return current


def trotter(n, i=1, digits=set()):
	return n * (i - 1) if len(digits) == 10 else 'INSOMNIA' if i > 900 else trotter(n, i + 1, digits.union(set(str(n * i))))


def trotter(n):
	digits = set()
	for i in range(n, 10 ** 10, n or 10 ** 10):
		digits.update(str(i))
		if len(digits) == 10:
			return i
	return 'INSOMNIA'


def trotter(n):
	seek = {str(e) for e in range(10)}
	for k in range(1, 73):
		seek -= {e for e in str(n * k)}
		if not seek:
			return n * k
	return 'INSOMNIA'


def trotter(n):
	if not n:
		return 'INSOMNIA'
	(seen, o) = (set(str(n)), n)
	while len(seen) != 10:
		n += o
		seen |= set(str(n))
	return n


def trotter(n):
	if not n:
		return 'INSOMNIA'
	dict = {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0}
	increment = n
	while True:
		for i in str(n):
			dict[int(i)] = dict.get(int(i), 0) + 1
		if next((j for j in dict.values() if j == 0), 1):
			break
		n += increment
	return n


def trotter(n):
	if n == 0:
		return 'INSOMNIA'
	(seen, k) = (set(str(n)), 1)
	while not set('1234567890').issubset(seen):
		k += 1
		seen.update(str(k * n))
	return n * k


def trotter(k):
	if not k:
		return 'INSOMNIA'
	d = set()
	for n in range(k, k * 73, k):
		d.update(set(str(n)))
		if len(d) == 10:
			return n