Run ID:74618
提交时间:2024-05-25 16:37:47
def find_x(a, b, c): for i in range(1000, 10000): if i % a == 0 and (i + 1) % b == 0 and (i + 2) % c == 0: return i return "Impossible" c = int(input()) for _ in range(c): a, b, c = map(int, input().split()) print(find_x(a, b, c))