mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-05-02 06:46:18 -04:00
reorganize dir
Signed-off-by: Mia Steinkirch <mia.steinkirch@gmail.com>
This commit is contained in:
parent
1b6f705e7c
commit
a8e71c50db
276 changed files with 23954 additions and 0 deletions
28
other_resources/Project-Euler/031-coin_sums.py
Normal file
28
other_resources/Project-Euler/031-coin_sums.py
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/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()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue