Skip to main content
Commonmark migration
Source Link

#Python 3, 31

Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a

#Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a

Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a
deleted 91 characters in body
Source Link
Morgan Thrapp
  • 3.7k
  • 15
  • 29

#Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a

Or for a 21 (saved 5 thanks to Sp3000) byte solution,

from math import*;gcd

#Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a

Or for a 21 (saved 5 thanks to Sp3000) byte solution,

from math import*;gcd

#Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a
deleted 16 characters in body
Source Link
Morgan Thrapp
  • 3.7k
  • 15
  • 29

#Python 3, 4031

Saved 3 bytes thanks to Sp3000.

defg=lambda g(a,b):
 b whileand g(b:a,b=b,a%b
 return)or a

Or for a 21 (saved 5 thanks to Sp3000) byte solution,

from math import*;gcd

#Python 3, 40

def g(a,b):
  while b:a,b=b,a%b
 return a

Or for a 21 (saved 5 thanks to Sp3000) byte solution,

from math import*;gcd

#Python 3, 31

Saved 3 bytes thanks to Sp3000.

g=lambda a,b:b and g(b,a%b)or a

Or for a 21 (saved 5 thanks to Sp3000) byte solution,

from math import*;gcd
added 17 characters in body
Source Link
Morgan Thrapp
  • 3.7k
  • 15
  • 29
Loading
Source Link
Morgan Thrapp
  • 3.7k
  • 15
  • 29
Loading