Agorithm/백준 알고리즘

백준 알고리즘 9501번 꿍의 우주여행(python)

kimjinho1 2021. 2. 23. 00:14
728x90
반응형

단순 사칙연산 문제이다. 이동거리 = 속도 * (연료양/연료소비율) = v * f/c

for _ in range(int(input())):
    N, D = map(int, input().split())
    cnt = 0
    for i in range(N):
        v, f, c = map(int, input().split())
        if v * f/c >= D:
            cnt += 1
    print(cnt)
728x90
반응형