Skip to main content
added 91 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 3, 1 * (5150 + 5150) = 102100

-2 bytes thanks to Neil!

First function:

Output is a tuple of characters.

lambda a,b:1and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!Try it online!

Second function:

lambda a,b:0and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!Try it online!

Python 3, 1 * (51 + 51) = 102

First function:

Output is a tuple of characters.

lambda a,b:1and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!

Second function:

lambda a,b:0and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!

Python 3, 1 * (50 + 50) = 100

-2 bytes thanks to Neil!

First function:

Output is a tuple of characters.

lambda a,b:1and sum(zip(a,b),())or(a+b)*(a-~b)/2+b 

Try it online!

Second function:

lambda a,b:0and sum(zip(a,b),())or(a+b)*(a-~b)/2+b 

Try it online!

Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 3, 1 * (51 + 51) = 102

First function:

Output is a tuple of characters.

lambda a,b:1and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!

Second function:

lambda a,b:0and sum(zip(a,b),())or(a+b)*(a-~b)//2+b 

Try it online!