본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 24783번 Number Fun

by 현장 2022. 11. 8.

-Code

from sys import stdin
for _ in range(int(stdin.readline())):
    a, b, c = map(int, stdin.readline().split())
    arr = [a + b, abs(a - b), a * b, a / b, b / a]
    print('Possible' if c in arr else 'Impossible')