Skip to main content
added 92 characters in body
Source Link
MarcMush
  • 6.6k
  • 13
  • 17

Julia 1.0, 2727 24 bytes

>(x,i=1)=0<x&&1+=1+(x0<x-1/i>i+1)

Try it online!

-3 bytes thanks to H.PWiz

the same approach as xnor

Try it online!

Julia 1.0, 27 bytes

>(x,i=1)=0<x&&1+(x-1/i>i+1)

the same approach as xnor

Try it online!

Julia 1.0, 27 24 bytes

>(x,i=1)=1+(0<x-1/i>i+1)

Try it online!

-3 bytes thanks to H.PWiz

the same approach as xnor

Source Link
MarcMush
  • 6.6k
  • 13
  • 17

Julia 1.0, 27 bytes

>(x,i=1)=0<x&&1+(x-1/i>i+1)

the same approach as xnor

Try it online!