PS/Baekjoon Online Judge
[백준 18330] Petrol [Python]
kimyoungrok
2023. 5. 3. 23:48
728x90
풀이
매달 60리터의 연료를 리터당 1500원에 구매할 수 있다.
이번 달에 구매할 연료의 양과, 이월되어 싸게 구매할 수 있는 양이 주어진다.
구매할 양과 이월된 양 + 60리터의 대소를 비교해 쉽게 계산할 수 있다.
소스코드
출처
18330번: Petrol
The input consists of two lines. The first line contains an integer n (0 ⩽ n ⩽ 200), specifying the amount of petrol that will be used in the next month. The second line contains an integer k (0 ⩽ k ⩽ 360), showing the quota left in Mahya’s fuel
www.acmicpc.net
728x90