#Pyth, 21 bytes
Pyth, 21 bytes
@*6cQ/iMcmhO^T6yQ2lN2
###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
###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
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
###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
###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 (削除ここまで) 2021 bytes
@*6cQ/iMcmO^T6yQ2lN2iMcmhO^T6yQ2lN2
Loading