Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

deleted 2 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 3, (削除) 48 (削除ここまで) (削除) 46 (削除ここまで) 4544 bytes

-1 byte2 bytes thanks to @nwellnhof

lambda*a:map(lambda*x:max(x)*2/len({*x})),*a)

Try it online! Try it online!

Python 3, (削除) 48 (削除ここまで) (削除) 46 (削除ここまで) 45 bytes

-1 byte thanks to @nwellnhof

lambda*a:map(lambda*x:max(x)*2/len({*x})),*a)

Try it online!

Python 3, (削除) 48 (削除ここまで) (削除) 46 (削除ここまで) 44 bytes

-2 bytes thanks to @nwellnhof

lambda*a:map(lambda*x:max(x)*2/len({*x}),*a)

Try it online!

added 23 characters in body; added 11 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 3, (削除) 48 (削除ここまで) 46(削除) 46 (削除ここまで) 45 bytes

-1 byte thanks to @nwellnhof

lambda*a:map(lambda*x:max(x)*(3-*2/len({*x})),*a)

Try it online! Try it online!

Python 3, (削除) 48 (削除ここまで) 46 bytes

lambda*a:map(lambda*x:max(x)*(3-len({*x})),*a)

Try it online!

Python 3, (削除) 48 (削除ここまで) (削除) 46 (削除ここまで) 45 bytes

-1 byte thanks to @nwellnhof

lambda*a:map(lambda*x:max(x)*2/len({*x})),*a)

Try it online!

added 8 characters in body
Source Link
ovs
  • 61.2k
  • 3
  • 49
  • 164

Python 2 Python 3, 45(削除) 48 (削除ここまで) 46 bytes

lambda*a:map(lambda x,ylambda*x:max(x,y)*(3-~len(x==y{*x})),*a)

Try it online! Try it online!

Python 2, 45 bytes

lambda*a:map(lambda x,y:max(x,y)*-~(x==y),*a)

Try it online!

Python 3, (削除) 48 (削除ここまで) 46 bytes

lambda*a:map(lambda*x:max(x)*(3-len({*x})),*a)

Try it online!

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

AltStyle によって変換されたページ (->オリジナル) /