-코드
for i in range(int(input())):
n, r1, c1, r2, c2 = map(int, input().split())
r = abs(r1 - r2) + abs(c1 - c2)
if r == 3:
print(f"Case {i + 1}: YES")
else:
print(f"Case {i + 1}: NO")
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬]8714번 Monety (0) | 2021.04.21 |
---|---|
[백준/파이썬]21339번 Contest Struggles (0) | 2021.04.21 |
[백준/파이썬]6249번 TV Reports (0) | 2021.04.20 |
[백준/파이썬]10270번 Algebraic Teamwork (0) | 2021.04.20 |
[백준/파이썬]7015번 Millennium (0) | 2021.04.20 |