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

4 of 4
Commonmark migration

Pyth, 21 bytes

@*6cQ/iMcmhO^T6yQ2lN2

Try it online.

Explanation

 Q input number
 y twice that
 m map numbers 0 to n-1:
 T 10
 ^ 6 to the 6th power
 O random number from 0 to n-1
 h add one
 c 2 split into pairs
 iM gcd of each pair
 / lN count ones
 cQ divide input number by the result
 *6 multiply by 6
@ 2 square root
PurkkaKoodari
  • 17.9k
  • 2
  • 37
  • 92

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