Number Fun

This commit is contained in:
2023-07-02 22:43:43 +02:00
parent 9fe04d95fe
commit b3565c8ef9

20
numberfun.py Normal file
View File

@@ -0,0 +1,20 @@
def test_case(a: int, b: int, c: int) -> bool:
if a + b == c:
return True
elif a - b == c:
return True
elif b - a == c:
return True
elif a * b == c:
return True
elif c * a == b:
return True
elif c * b == a:
return True
return False
n = int(input())
for _ in range(n):
a, b, c = map(int, input().split())
print("Possible" if test_case(a, b, c) else "Impossible")