Run ID:74134
提交时间:2024-05-22 22:07:51
t = int(input()) for _ in range(t): a, b, c = map(int, input().split()) x = 1000 found = False while x <= 9999: if x % a == 0 and (x + 1) % b == 0 and (x + 2) % c == 0: found = True break x += 1 if found: print(x) else: print("Impossible")