summaryrefslogtreecommitdiff
path: root/progs/a523.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a523.py')
-rw-r--r--progs/a523.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/a523.py b/progs/a523.py
new file mode 100644
index 0000000..d83e1fc
--- /dev/null
+++ b/progs/a523.py
@@ -0,0 +1,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") \ No newline at end of file