-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1018.py
More file actions
41 lines (32 loc) · 851 Bytes
/
1018.py
File metadata and controls
41 lines (32 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
value = int(input())
val = value
cem = cinq = vinte = dez = cinc = dois = um = 0
if int(value/100) >= 1:
cem = int(value/100)
value -= cem*100
if int(value/50) >= 1:
cinq = int(value/50)
value -= cinq*50
if int(value/20) >= 1:
vinte = int(value/20)
value -= vinte*20
if int(value/10) >= 1:
dez = int(value/10)
value -= dez*10
if int(value/5) >= 1:
cinc = int(value/5)
value -= cinc*5
if int(value/2) >= 1:
dois = int(value/2)
value -= dois*2
if int(value/1) >= 1:
um = int(value/1)
value -= um*1
print("%d" % val)
print("%d nota(s) de R$ 100,00" % cem)
print("%d nota(s) de R$ 50,00" % cinq)
print("%d nota(s) de R$ 20,00" % vinte)
print("%d nota(s) de R$ 10,00" % dez)
print("%d nota(s) de R$ 5,00" % cinc)
print("%d nota(s) de R$ 2,00" % dois)
print("%d nota(s) de R$ 1,00" % um)