diff options
Diffstat (limited to 'progs/a514.py')
-rw-r--r-- | progs/a514.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/progs/a514.py b/progs/a514.py new file mode 100644 index 0000000..9e850e6 --- /dev/null +++ b/progs/a514.py @@ -0,0 +1,6 @@ +def gcd(p,q):
+ while q != 0:
+ p, q = q,p%q
+ return p
+def is_coprime(x,y):
+ return gcd(x,y) == 1
\ No newline at end of file |