summaryrefslogtreecommitdiff
path: root/progs/a523.py
blob: d83e1fc7b129025e5ca3f268f4cf696448a89596 (plain)
1
2
3
4
5
6
7
8
9
def solution (a, b, n): 
	i = 0
	while i * a <= n: 
		if (n - (i * a)) % b == 0: 
			return ("x = ",i ,", y = ", 
			int((n - (i * a)) / b)) 
			return 0
		i = i + 1
	return ("No solution")