Skip to main content
added 27 characters in body
Source Link
Noodle9
  • 20.4k
  • 3
  • 23
  • 47

Python 3.8, 69 68 bytes

Saved a byte thanks to newbie!!!

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2::-2]) import math 

Try it online!Try it online!

Python 3.8, 69 68 bytes

Saved a byte thanks to newbie!!!

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2::-2]) import math 

Try it online!

Python 3.8, 69 68 bytes

Saved a byte thanks to newbie!!!

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2::-2]) import math 

Try it online!

added 114 characters in body
Source Link
Noodle9
  • 20.4k
  • 3
  • 23
  • 47

Python 3.8, 6969 68 bytes

Saved a byte thanks to newbie!!!

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2:0:-1]2]) import math 

Try it online!Try it online!

Python 3.8, 69 bytes

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2:0:-1]) import math 

Try it online!

Python 3.8, 69 68 bytes

Saved a byte thanks to newbie!!!

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2::-2]) import math 

Try it online!

deleted 8 characters in body
Source Link
Noodle9
  • 20.4k
  • 3
  • 23
  • 47

Python 3.8, 7269 bytes

lambda a,b:math.comb(max(*sorted(l:=[*mapmap(abs,[a,b,a-b])])),min(l)[2:0:-1]) import math 

Try it online!Try it online!

Python 3.8, 72 bytes

lambda a,b:math.comb(max((l:=[*map(abs,[a,b,a-b])])),min(l)) import math 

Try it online!

Python 3.8, 69 bytes

lambda a,b:math.comb(*sorted(map(abs,[a,b,a-b]))[2:0:-1]) import math 

Try it online!

added 209 characters in body
Source Link
Noodle9
  • 20.4k
  • 3
  • 23
  • 47
Loading
Source Link
Noodle9
  • 20.4k
  • 3
  • 23
  • 47
Loading