mirror of
https://github.com/correl/euler.git
synced 2024-11-27 11:09:54 +00:00
Problem 031 - WIP
This commit is contained in:
parent
275905958e
commit
ceb8b9385a
1 changed files with 20 additions and 0 deletions
20
e031.py
Normal file
20
e031.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
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 + 150p + 220p + 15p + 12p + 31p
|
||||
|
||||
How many different ways can £2 be made using any number of coins?
|
||||
"""
|
||||
|
||||
if __name__ == '__main__':
|
||||
coins = [1, 2, 5, 10, 20, 50, 100, 200]
|
||||
coins = [200, 100, 50, 20, 10, 5, 2, 1]
|
||||
combinations = 0
|
||||
for start in range(len(coins)):
|
||||
current = start
|
||||
total = 0
|
||||
break
|
Loading…
Reference in a new issue