Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- a = 1653750
- b = 780
- def gcd(a, b):
- if b == 0:
- return a
- else:
- return gcd(b, a % b)
- def mcd(n,m):
- return (n/gcd(n,m))*m
- print "НОД:",gcd(a,b)
- print"НОК:",mcd(a,b)
Advertisement
Add Comment
Please, Sign In to add comment