+ 11

💻💻💻💻CHALLENGE💻💻💻💻

Suppose x is a number.x is called 'n-Capricus' if the last n digits of x powers to x. Eg. 625 : 25 last two digit and square(25)=625 hence '625 is 2-Capricus' n=2; 625 is also a 1-capricus as 5^4=625 25: 5 is last digit and square(5)=25 hence 1-Capricus 64 4 is last digit and cube(4)=64 hence 1-Capricus. Write a program that accepts a numbers and checks if its a Capricus and prints n.

10th Mar 2018, 6:29 PM
Neelarghya Kundu
Neelarghya Kundu - avatar
10 Answers
12th Mar 2018, 9:05 AM
LukArToDo
LukArToDo - avatar
+ 10
Suppose x is a number.x is called 'n-Capricus' if the last n digits of x powers to n. //might here n in place of x //btw U must post it as an assignment in lesson factory
10th Mar 2018, 7:27 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 5
I googled Caprirus numbers but I didn't find anything about them. I just wanted to find more numbers. Anyway it works well with numbers 625 , 25 and 64 😃 https://code.sololearn.com/co5u8Pk4eEc5/?ref=app
10th Mar 2018, 7:30 PM
voja
voja - avatar
+ 5
gaurav agrawal I have posted it
10th Mar 2018, 7:33 PM
Neelarghya Kundu
Neelarghya Kundu - avatar
+ 5
no my teacher gave it as an assignment.
15th Mar 2018, 9:39 AM
Neelarghya Kundu
Neelarghya Kundu - avatar
+ 4
11th Mar 2018, 4:27 AM
Neelarghya Kundu
Neelarghya Kundu - avatar
13th Mar 2018, 2:06 AM
Jacob Snover
Jacob Snover - avatar
+ 2
Thanks for the challenge, Neelarghya Kundu! It was fun to code for a beginner like me! Here is my piece (Python): https://code.sololearn.com/cj5a5g49j0H8/#py
12th Mar 2018, 8:53 PM
Andrey Vostokov
Andrey Vostokov - avatar