mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-04-30 12:46:11 -04:00
29 lines
639 B
Python
29 lines
639 B
Python
#!/usr/bin/python3
|
||
# mari wahl @2014
|
||
# marina.w4hl at gmail
|
||
'''
|
||
In England the currency is made up of pound, £, and pence, p, and there are eight coins in general circulation:
|
||
|
||
1p, 2p, 5p, 10p, 20p, 50p, £1 (100p) and £2 (200p).
|
||
It is possible to make £2 in the following way:
|
||
|
||
1×£1 + 1×50p + 2×20p + 1×5p + 1×2p + 3×1p
|
||
How many different ways can £2 be made using any number of coins?
|
||
'''
|
||
|
||
|
||
|
||
|
||
def main():
|
||
import time
|
||
start = time.time()
|
||
|
||
print(digit_fifth_pow(5))
|
||
|
||
elapsed = (time.time() - start)
|
||
print('Tests Passed!\n It took %s seconds to run them.' % (elapsed))
|
||
|
||
if __name__ == '__main__':
|
||
main()
|
||
|