-1 thanks to @ovs!
gL._pP
Outputs 1
if a circular prime, and 0
if not! :D
Try it online!
This is actually my first effortful code answer in this site! Yey!
How?
g # Get the number of digits in the input number.
L # Push a list of all numbers from 1 to the length.
._ # For each number 'n' in the list, rotate the input to to the left n times and push a list of all outcomes.
p # Is each rotation a prime? If prime, convert that number to 1, else convert it to 0.
P # Push the product of all 1's or 0's (if a rotation is not prime, the product should be zero).
# Print the product automatically.
05AB1E, 17 16 bytes
Again -1 thanks to @ovs!
gL._pP“‹ë“si“ÒŽ“
This code follows the output standard suggested by the test cases. I wrote this just in case my previous answer is invalid. If it is not, please count 6B as my score!
Try it online!
How again?
gL._pP # Works just like the previous answer.
“‹ë“ # Push the string "nothing" from the 05AB1E dictionary.
s # Bring back the number output again.
i # If the number is 1...
“ÒŽ“ # Push the string "circular" again from the 05AB1E dictionary.
Thanks to @Kevin Cruijssen's tip on compressing strings! :)
Edit: Wow, I noticed that both of my answers are currently the shortest (during the time of writing). That is kind of ironic for a first effortful answer. That means I won!
99,98,97...
is equivalent to the lyrics of '99 bottles of beer on the wall' but it wasn't an accepted answer!" \$\endgroup\$