Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
85266 彭士宝 猜数字 Python3 Accepted 105 MS 3764 KB 297 2024-07-16 20:29:47

Tests(1/1):


Code:

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)