DNPotapov / Codewars-katas-

0 stars 0 forks source link

Greatest common divisor (7 kyu) #2

Open DNPotapov opened 2 years ago

DNPotapov commented 2 years ago
import math
def mygcd(x, y):
    return math.gcd(x,y)
DNPotapov commented 2 years ago

Find the greatest common divisor of two positive integers. The integers can be large, so you need to find a clever solution.

The inputs x and y are always greater or equal to 1, so the greatest common divisor will always be an integer that is also greater or equal to 1.

DNPotapov commented 1 year ago

https://www.codewars.com/kata/5500d54c2ebe0a8e8a0003fd