DNPotapov / Codewars-katas-

0 stars 0 forks source link

Greatest common divisor (7 kyu) #2

Open DNPotapov opened 1 year ago

DNPotapov commented 1 year ago
import math
def mygcd(x, y):
    return math.gcd(x,y)
DNPotapov commented 1 year 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