Write a program which calculates if an inputted monetary value, as an integer, can be represented by a unique combination of coins and/or notes, that meaning the same coin/note cannot be used more than once.
Your program should take a value as input, preferably through STDIN, and can take a list of coin/note values either via STDINinput or via your language's equivalent of an array. The list of coins/notes should be able to change, so make sure it's clear where this is defined if you're using a constant.
Your program should output preferably to STDOUT any truthy/falsy value respectively.
Please note that outputting the list of coins/notes that make up the value is not required.
#EXAMPLE Using the UK pound, (£1.00 = 100 and £420.69 = 42069)
coins = [1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000]
The following will output true:
6 (1, 5)
15 (10, 5)
88 (1, 2, 5, 10, 20, 50)
512 (500, 10, 2)
7003 (5000, 2000, 2, 1)
The following will output false:
4
209
8889
4242424242
[ANYTHING ABOVE 8888]
#ALTERNATIVE TEST DATA (US Dollar)
coins = [1, 5, 10, 25, 50, 100, 200, 500, 1000, 2000, 5000, 10000]
Good luck!