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

Commonmark migration
Source Link

#Pyth, 21 bytes

Pyth, 21 bytes

@*6cQ/iMcmhO^T6yQ2lN2

Try it online.

###Explanation

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

#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

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
added 454 characters in body
Source Link
PurkkaKoodari
  • 17.9k
  • 2
  • 37
  • 92

#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

#Pyth, 21 bytes

@*6cQ/iMcmhO^T6yQ2lN2

Try it online.

#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
deleted 8 characters in body
Source Link
PurkkaKoodari
  • 17.9k
  • 2
  • 37
  • 92

#Pyth, (削除) 21 (削除ここまで) 2021 bytes

@*6cQ/iMcmO^T6yQ2lN2iMcmhO^T6yQ2lN2

Try it online. Try it online.

#Pyth, (削除) 21 (削除ここまで) 20 bytes

@*6cQ/iMcmO^T6yQ2lN2

Try it online.

#Pyth, 21 bytes

@*6cQ/iMcmhO^T6yQ2lN2

Try it online.

Source Link
PurkkaKoodari
  • 17.9k
  • 2
  • 37
  • 92
Loading

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