목차
728x90
10180번: Ship Selection
Input begins with a line with one integer T (1 ≤ T ≤ 50) denoting the number of test cases. Each test case begins with a line with two space-separated integers N and D, where N (1 ≤ N ≤ 100) denotes the number of ships in the docking bay and D (1
www.acmicpc.net
정답 코드
for _ in range(int(input())) :
N, D = map(int, input().split())
cnt = 0
for _ in range(N) :
V, F, C = map(int, input().split())
if V * (F / C) >= D : cnt += 1
print(cnt)
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 10187 - Golden [python] (0) | 2023.03.28 |
---|---|
[BOJ/백준] 10185 - Focus [python] (0) | 2023.03.28 |
[BOJ/백준] 10178 - 할로윈의 사탕 [python] (0) | 2023.03.28 |
[BOJ/백준] 9950 - Rectangles [python] (0) | 2023.03.28 |
[BOJ/백준] 9945 - Centroid of Point Masses [python] (0) | 2023.03.28 |
728x90
10180번: Ship Selection
Input begins with a line with one integer T (1 ≤ T ≤ 50) denoting the number of test cases. Each test case begins with a line with two space-separated integers N and D, where N (1 ≤ N ≤ 100) denotes the number of ships in the docking bay and D (1
www.acmicpc.net
정답 코드
for _ in range(int(input())) :
N, D = map(int, input().split())
cnt = 0
for _ in range(N) :
V, F, C = map(int, input().split())
if V * (F / C) >= D : cnt += 1
print(cnt)
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 10187 - Golden [python] (0) | 2023.03.28 |
---|---|
[BOJ/백준] 10185 - Focus [python] (0) | 2023.03.28 |
[BOJ/백준] 10178 - 할로윈의 사탕 [python] (0) | 2023.03.28 |
[BOJ/백준] 9950 - Rectangles [python] (0) | 2023.03.28 |
[BOJ/백준] 9945 - Centroid of Point Masses [python] (0) | 2023.03.28 |