728x90
풀이
사용량이 1000KWH 이하인 경우에 적용되는 요금과, 초과한 경우 적용하는 요금을 입력받고,
사용한 전력량에 대해 요금을 계산해 출력하면 되는 문제다.
소스코드
출처
25881번: Electric Bill
The first input line contains two integers (each between 2 and 20, inclusive), indicating the rate/KWH for the first 1000 KWH and the rate/KWH for the additional usage, respectively. The next input line contains a positive integer, n, indicating the number
www.acmicpc.net
728x90
'PS > Baekjoon Online Judge' 카테고리의 다른 글
[백준 9036] 대지 [Python] (0) | 2023.08.11 |
---|---|
[백준 28433] 게리맨더링 [Python] (0) | 2023.08.11 |
[백준 2104] 부분배열 고르기 [C++] (0) | 2023.08.07 |
[백준 25858] Divide the Cash [Python] (0) | 2023.08.05 |
[백준 25828] Corona Virus Testing [Python] (0) | 2023.08.05 |