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

-3 bytes
Source Link
daniero
  • 18.8k
  • 5
  • 52
  • 79

Python 3, (削除) 37 (削除ここまで) 30(削除) 30 (削除ここまで) 27 bytes

-7 bytes from @FelipeNardiBatista.
-3 bytes from from @xnor

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambda x:eval(f'{x}**'*99+'1''x**'*99+'1')

Try it online! Try it online!

Python 3, (削除) 37 (削除ここまで) 30 bytes

-7 bytes from @FelipeNardiBatista

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambda x:eval(f'{x}**'*99+'1')

Try it online!

Python 3, (削除) 37 (削除ここまで) (削除) 30 (削除ここまで) 27 bytes

-7 bytes from @FelipeNardiBatista.
-3 bytes from from @xnor

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambda x:eval('x**'*99+'1')

Try it online!

added 37 characters in body
Source Link
daniero
  • 18.8k
  • 5
  • 52
  • 79

Python 3, (削除) 37 (削除ここまで) 3230 bytes

-7 bytes from @FelipeNardiBatista

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

f=lambda x:eval(f'{x}**'*99+'1')
lambda x:eval(f'{x}**'*99+'1')

Try it online! Try it online!

Python 3, (削除) 37 (削除ここまで) 32 bytes

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

f=lambda x:eval(f'{x}**'*99+'1')

Try it online!

Python 3, (削除) 37 (削除ここまで) 30 bytes

-7 bytes from @FelipeNardiBatista

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambda x:eval(f'{x}**'*99+'1')

Try it online!

-5 bytes courtesy of Felipe Nardi Batista
Source Link
daniero
  • 18.8k
  • 5
  • 52
  • 79

Python 3, 37(削除) 37 (削除ここまで) 32 bytes

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambdaf=lambda nx:eval('**'.join([str(n)]*99)f'{x}**'*99+'1')

Try it online! Try it online!

Python 3, 37 bytes

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

lambda n:eval('**'.join([str(n)]*99))

Try it online!

Python 3, (削除) 37 (削除ここまで) 32 bytes

I don't remember much of Python anymore, but I managed to port my Ruby answer and beat the other Python 3 answer :D

f=lambda x:eval(f'{x}**'*99+'1')

Try it online!

Source Link
daniero
  • 18.8k
  • 5
  • 52
  • 79
Loading

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