File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -16,35 +16,35 @@ def one_pence():
16
16
return 1
17
17
18
18
19
- def two_pence (x ) :
19
+ def two_pence (x : int ) -> int :
20
20
return 0 if x < 0 else two_pence (x - 2 ) + one_pence ()
21
21
22
22
23
- def five_pence (x ) :
23
+ def five_pence (x : int ) -> int :
24
24
return 0 if x < 0 else five_pence (x - 5 ) + two_pence (x )
25
25
26
26
27
- def ten_pence (x ) :
27
+ def ten_pence (x : int ) -> int :
28
28
return 0 if x < 0 else ten_pence (x - 10 ) + five_pence (x )
29
29
30
30
31
- def twenty_pence (x ) :
31
+ def twenty_pence (x : int ) -> int :
32
32
return 0 if x < 0 else twenty_pence (x - 20 ) + ten_pence (x )
33
33
34
34
35
- def fifty_pence (x ) :
35
+ def fifty_pence (x : int ) -> int :
36
36
return 0 if x < 0 else fifty_pence (x - 50 ) + twenty_pence (x )
37
37
38
38
39
- def one_pound (x ) :
39
+ def one_pound (x : int ) -> int :
40
40
return 0 if x < 0 else one_pound (x - 100 ) + fifty_pence (x )
41
41
42
42
43
- def two_pound (x ) :
43
+ def two_pound (x : int ) -> int :
44
44
return 0 if x < 0 else two_pound (x - 200 ) + one_pound (x )
45
45
46
46
47
- def solution (n ) :
47
+ def solution (n : int ) -> int :
48
48
"""Returns the number of different ways can n pence be made using any number of
49
49
coins?
50
50
You can’t perform that action at this time.
0 commit comments