Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
85267 | 胡海峰老师 | 猜数字 | Python3 | Accepted | 112 MS | 3784 KB | 346 | 2024-07-16 20:39:12 |
def guess_number(a,b,c): for x in range(1000,9999+1): if x%a ==0 and (x+1)%b==0 and (x+2)%c==0: return x return "Impossible" #不可能 t = int(input()) lst =[] for _ in range(t): a,b,c = map(int,input().split()) res = guess_number(a,b,c) lst.append(res) for ele in lst: print(ele)