from typing import List
def puzzle(moves: List[List[int]]):
rods = ([8, 7, 6, 5, 4, 3, 2, 1], [], [])
for [i, j] in moves:
rods[j].append(rods[i].pop())
assert rods[j][-1] == min(rods[j]), "larger disk on top of smaller disk"
return rods == ([], [], [8, 7, 6, 5, 4, 3, 2, 1])
def solution():
moves = []
def f(n, source, temp, dest):
if n > 0:
f(n - 1, source, dest, temp)
moves.append([source, dest])
f(n - 1, temp, source, dest)
f(8, 0, 1, 2)
return moves
def puzzle(s: str):
return s.count('A') == 1000 and s.count('AA') == 0
def solution():
return 'AB' * 1000
def puzzle(i: int, n=241864633):
return 1 < i < n and n % i == 0
def solution(n=241864633):
for i in range(2, int(n ** 0.5) + 1):
if n % i == 0:
return i