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

[백준/파이썬] 9622번 Cabin Baggage

by 현장 2025. 2. 5.

-Code

cnt = 0

for _ in range(int(input())):
    length, width, depth, weight = map(float, input().split())
    if ((length > 56 or width > 45 or depth > 25)
            and length + width + depth > 125 or weight > 7):
        print(0)
        continue
    cnt += 1
    print(1)
print(cnt)