Run ID:85266
提交时间:2024-07-16 20:29:47
def find_x(a, b, c): for x in range(1000, 10000): if x % a == 0 and (x + 1) % b == 0 and (x + 2) % c == 0: return x return "Impossible" c = int(input()) for _ in range(c): (a, b, c) = map(int, input().split()) result = find_x(a, b, c) print(result)