#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.
(= (__ 4 7 3) nil) ; No solution for 4x + 7y = 3 | |
(= (__ 3 6 9) [3 0]) ; One possible solution is x=3, y=0 for 3x + 6y = 9 | |
(= (__ 2 -3 7) [7 0]) ; One possible solution is x=7, y=0 for 2x - 3y = 7 | |
(= (__ 5 5 10) [2 0]) ; One possible solution is x=2, y=0 for 5x + 5y = 10 |