반응형
[ Contents ]
1. 문제 (링크 참조)
21633번: Bank Transfer
Tanya has an account in "Redgotts" bank. The bank has the commission to transfer money to "Bluegotts" bank that her friend Vanya has the account in. Tanya has read her bank rules and learned the following: The commission for the bank transfer is $25$ tugri
www.acmicpc.net
2. 문제 풀이
이체 수수료를 계산합니다. 수수료는 '25 + 송금액*0.01' 로 계산하며, 최소 100 ~ 최대 2000입니다.
3. 코드
# 입력
k = int(input())
# 수수료 계산
fees = 25 + k*0.01
if fees < 100:
print(100)
elif fees > 2000:
print(2000)
else:
print(fees)
반응형
'Algorithm' 카테고리의 다른 글
[구현/수학] 백준 24083 短針 (Hour Hand) - 파이썬(Python) (1) | 2022.10.04 |
---|---|
[브루트포스/수학] 백준 1145 거의 대부분의 배수 - 파이썬(Python) (0) | 2022.10.03 |
[구현/수학] 백준 20233 Bicycle - 파이썬(Python) (0) | 2022.10.01 |
[그리디/Greedy] 백준 14469 소가 길을 건너간 이유 3 - 파이썬(Python) (0) | 2022.09.30 |
[구현/수학] 백준 21591 Laptop Sticker - 파이썬(Python) (0) | 2022.09.29 |
댓글