python-algorithm

백준 21633 Bank Transfer

무적김두칠 2022. 12. 21. 14:03

https://www.acmicpc.net/problem/21633

 

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

 

1
2
3
4
5
6
7
8
9
10
11
def sol(n):
    answer = 25 + n*0.01
    if answer >=2000:
        answer = 2000
    elif answer <=100:
        answer = 100
    return answer
 
if __name__ == '__main__':
    n = int(input())
    print("%.2f"%sol(n))
cs
반응형