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

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

Jelly, 4 bytes

Since xnor came up with this algorithm this algorithm, I will make this community wiki.

Bṙ1Ḅ

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary

Jelly, 4 bytes

Since xnor came up with this algorithm, I will make this community wiki.

Bṙ1Ḅ

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary

Jelly, 4 bytes

Since xnor came up with this algorithm, I will make this community wiki.

Bṙ1Ḅ

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary
deleted 173 characters in body
Source Link
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

Jelly, (削除) 4 (削除ここまで) 34 bytes

Crossed out 4 is still regular 4 ;(

Since xnor came up with this algorithm, I will make this community wiki.

(削除) Bṙ1Ḅ (削除ここまで)
&Ḥ‘Bṙ1Ḅ

Try it online! Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary
&Ḥ‘
&Ḥ z and (z*2)
 ‘ +1

Jelly, (削除) 4 (削除ここまで) 3 bytes

Crossed out 4 is still regular 4 ;(

Since xnor came up with this algorithm, I will make this community wiki.

(削除) Bṙ1Ḅ (削除ここまで)
&Ḥ‘

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary
&Ḥ‘
&Ḥ z and (z*2)
 ‘ +1

Jelly, 4 bytes

Since xnor came up with this algorithm, I will make this community wiki.

Bṙ1Ḅ

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary
Source Link
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

Jelly, (削除) 4 (削除ここまで) 3 bytes

Crossed out 4 is still regular 4 ;(

Since xnor came up with this algorithm, I will make this community wiki.

(削除) Bṙ1Ḅ (削除ここまで)
&Ḥ‘

Try it online!

Explanation

Bṙ1Ḅ
B convert to binary
 ṙ1 left-rotate by 1
 Ḅ convert from binary
&Ḥ‘
&Ḥ z and (z*2)
 ‘ +1
Post Made Community Wiki by Leaky Nun

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