Skip to main content
added 32 characters in body
Source Link
Gymhgy
  • 8k
  • 11
  • 35

Japt, 76 bytes

p é²é ¤øU

Try it online! Saved one byte thanks to @Shaggy

Try it online!

         Implicit input, stored in variable 'U'
p ²       U+U, "abcabc" -> "abcabcabcabc"
  é      Rotate 1 char to the right "abcabcabcabc" -> "cabcabcabcab"
    ¤    Remove first two chars, "cabcabcabcab" -> "bcabcabcab"
     øU  Check if U is in the above

Japt, 7 bytes

p é ¤øU

Try it online!

         Implicit input, stored in variable 'U'
p        U+U, "abcabc" -> "abcabcabcabc"
  é      Rotate 1 char to the right "abcabcabcabc" -> "cabcabcabcab"
    ¤    Remove first two chars, "cabcabcabcab" -> "bcabcabcab"
     øU  Check if U is in the above

Japt, 6 bytes

²é ¤øU

Saved one byte thanks to @Shaggy

Try it online!

        Implicit input, stored in variable 'U'
²       U+U, "abcabc" -> "abcabcabcabc"
 é      Rotate 1 char to the right "abcabcabcabc" -> "cabcabcabcab"
   ¤    Remove first two chars, "cabcabcabcab" -> "bcabcabcab"
    øU  Check if U is in the above
added 285 characters in body
Source Link
Gymhgy
  • 8k
  • 11
  • 35

Japt, 7 bytes

p é ¤øU

Try it online!

         Implicit input, stored in variable 'U'
p        U+U, "abcabc" -> "abcabcabcabc"
  é      Rotate 1 char to the right "abcabcabcabc" -> "cabcabcabcab"
    ¤    Remove first two chars, "cabcabcabcab" -> "bcabcabcab"
     øU  Check if U is in the above

Japt, 7 bytes

p é ¤øU

Try it online!

Japt, 7 bytes

p é ¤øU

Try it online!

         Implicit input, stored in variable 'U'
p        U+U, "abcabc" -> "abcabcabcabc"
  é      Rotate 1 char to the right "abcabcabcabc" -> "cabcabcabcab"
    ¤    Remove first two chars, "cabcabcabcab" -> "bcabcabcab"
     øU  Check if U is in the above
Source Link
Gymhgy
  • 8k
  • 11
  • 35

Japt, 7 bytes

p é ¤øU

Try it online!