#357
The Diophantine Dilemma
 

Difficulty:Medium
Topics:Math and numbers


Mission: "The Diophantine Dilemma" meminta elo untuk menemukan setidaknya satu pasang bilangan bulat (x, y) yang memenuhi persamaan Diophantine ax + by = c, dimana a, b, dan c diberikan. Kembalikan nil jika tidak ada solusi.
test not run
(= (__ 4 7 3) nil) ; No solution for 4x + 7y = 3
test not run
(= (__ 3 6 9) [3 0]) ; One possible solution is x=3, y=0 for 3x + 6y = 9
test not run
(= (__ 2 -3 7) [7 0]) ; One possible solution is x=7, y=0 for 2x - 3y = 7
test not run
(= (__ 5 5 10) [2 0]) ; One possible solution is x=2, y=0 for 5x + 5y = 10


Code which fills in the blank: