-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path1018.py
19 lines (16 loc) · 828 Bytes
/
1018.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
valor = float(input())
cem = int (valor / 100)
cinquenta = int ((valor - cem * 100) / 50)
vinte = int((valor - cem * 100 - cinquenta * 50) / 20)
dez = int ((valor - cem * 100 - cinquenta * 50 - vinte * 20) / 10)
cinco = int ((valor - cem * 100 - cinquenta * 50 - vinte * 20 - dez * 10) / 5)
dois = int ((valor - cem * 100 - cinquenta * 50 - vinte * 20 - dez * 10 - cinco * 5) / 2)
um = int ((valor - cem * 100 - cinquenta * 50 - vinte * 20 - dez * 10 - cinco * 5 - dois * 2) / 1)
print("{:.2f}".format(valor))
print("{} nota(s) de R$ 100,00".format(cem))
print("{} nota(s) de R$ 50,00".format(cinquenta))
print("{} nota(s) de R$ 20,00".format(vinte))
print("{} nota(s) de R$ 10,00".format(dez))
print("{} nota(s) de R$ 5,00".format(cinco))
print("{} nota(s) de R$ 2,00".format(dois))
print("{} nota(s) de R$ 1,00".format(um))