Blame view

scripts/coins.py 283 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import itertools

coins = [9, 2, 3, 5, 7]
combinations = itertools.permutations(coins,len(coins))

for elem in combinations:
	A = elem[0]
	B = elem[1]
	C = elem[2]
	D = elem[3]
	E = elem[4]
	if(A + B*pow(C,2) + pow(D,3) - E == 399):
		print A
		print B
		print C
		print D
		print E