-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path31.py
75 lines (61 loc) · 2.31 KB
/
31.py
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#-*-coding:utf8;-*-
#qpy:3
#qpy:console
total = 200
count = 0
for two_hun in range(1 + 1):
total -= 200 * two_hun
if total == 0:
count += 1
total += 200 * two_hun
continue
for one_hun in range(2 + 1):
total -= 100 * one_hun
if total == 0:
count += 1
total += 100 * one_hun
continue
for fifty_p in range(4 + 1):
total -= 50 * fifty_p
if total == 0:
count += 1
total += 50 * fifty_p
continue
for twenty_p in range(10 + 1):
total -= 20 * twenty_p
if total == 0:
count += 1
total += 20 * twenty_p
continue
for ten_p in range(20 + 1):
total -= 10 * ten_p
if total == 0:
count += 1
total += 10 * ten_p
continue
for five_p in range(40 + 1):
total -= 5 * five_p
if total == 0:
count += 1
total += 5 * five_p
continue
for two_p in range(100 + 1):
total -= 2 * two_p
if total == 0:
count += 1
total += 2 * two_p
continue
for one_p in range(200 + 1):
total -= 1 * one_p
if total == 0:
count += 1
total += 1 * one_p
total += 1 * one_p
total += 2 * two_p
total += 5 * five_p
total += 10 * ten_p
total += 20 * twenty_p
total += 50 * fifty_p
total += 100 * one_hun
total += 200 * two_hun
print(count)