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 Revisions

2 of 2
added 32 characters in body
user avatar
user avatar

CJam, 9 bytes

CJam has mQ, but unfortunately it trunctuates to an integer ... Another port of Lyxal's answer.

q~2 .5#/i

Try it online!

Explanation

q~ e# Take input & evaluate
 2 e# Take 2 to the power of ...
 .5# e# ... 0.5 (equal to square root)
 / e# Divide the input by it
 i e# Convert to integer
user85052

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