728x90
9622번: Cabin Baggage
The first line contains an integer t (1≤ t ≤ 300) which determines the number of test cases (i.e. cabin baggage to verify). The following t lines contain the measurement of cabin baggage. Each line contains 4 values which are length, width, depth and w
www.acmicpc.net
문제 풀이
문제의 조건에 맞게 입력값을 처리해주면 된다.
정답 코드
cnt = 0
for _ in range(int(input())) :
a, b, c, d = map(float, input().split())
if (a + b + c <= 125 or (a <= 56 and b <= 45 and c <= 25)) and d <= 7 :
print(1)
cnt += 1
else : print(0)
print(cnt)
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 9698 - SAHUR & IMSA’ [python] (0) | 2023.03.27 |
---|---|
[BOJ/백준] 9635 - Balloons Colors [python] (0) | 2023.03.26 |
[BOJ/백준] 9550 - 아이들은 사탕을 좋아해 [python] (0) | 2023.03.26 |
[BOJ/백준] 9517 - 아이 러브 크로아티아 [python] (0) | 2023.03.26 |
[BOJ/백준] 9493 - 길면 기차, 기차는 빨라, 빠른 것은 비행기 [python] (0) | 2023.03.25 |