[ ASSIGNMENT: ] Trimorphic Number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 39

[ ASSIGNMENT: ] Trimorphic Number

TASK: Write a program to check whether a given number is trimorphic or not? In mathematics a trimorphic number is a number whose cube (expressed in a given base) ends in the number itself.  For example:                         4^3 = 64                         24^3 = 13824                         249^3 = 15438249 NOTE: Every automorphic number is also a trimorphic number, but there are trimorphic numbers which are not automorphic (such as 4, 9 and 24). HappyCodings!:-) https://www.sololearn.com/learn/6264/?ref=app

18th Mar 2018, 11:00 AM
Danijel Ivanović
Danijel Ivanović - avatar
42 Answers
+ 23
https://code.sololearn.com/cX0XifP556fW/?ref=app
18th Mar 2018, 4:44 PM
LukArToDo
LukArToDo - avatar
18th Mar 2018, 12:45 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 25
If you want, I would like to solve the task, the theory of numbers can always be discussed! For me this is a challenge and I do not want to lead here to discuss the practical application of numbers because they always have them in nature! Happy Coding !!
18th Mar 2018, 11:59 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 25
19th Mar 2018, 2:05 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 23
@Subair Sankethathil Make your code Public! Thanks for suggestion 😊👍 Nice changes you make, and thank you for that 😀 Please, remove my parts of code out off your and then set it up! ☺ Thanks for taking part 😉👍
19th Mar 2018, 7:53 PM
Danijel Ivanović
Danijel Ivanović - avatar
19th Mar 2018, 9:37 AM
MeanMachine
MeanMachine - avatar
+ 22
@LukArToDo My friend, ☺ Since every time I learn something new from you and get the idea to do the code, 😉 your answer deserves to be the best! 👌👏👏🌞😆👍 Thank you for everything!! 🤗
19th Mar 2018, 2:12 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 20
@D_Stark ☺👍 4^3 == 4*4*4 (24)^3 == 24*24*24
18th Mar 2018, 3:19 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 14
@Danijel Thank you for having marked my answer as best and for such nice words 😊, I'm honored because I saw here great solutions for this task 👍
19th Mar 2018, 2:41 PM
LukArToDo
LukArToDo - avatar
18th Mar 2018, 12:06 PM
Morpheus
Morpheus - avatar
+ 11
https://code.sololearn.com/cNZro4w1idTJ/?ref=app
18th Mar 2018, 11:35 AM
hinanawi
hinanawi - avatar
18th Mar 2018, 12:29 PM
cHiRaG GhOsH
cHiRaG GhOsH - avatar
+ 11
My try.. https://code.sololearn.com/cCa0kZXEmjSH/?ref=app [EDIT] Corrected, the previous was checking if a number is a cube of a trimorphic.. https://code.sololearn.com/czxGoI95koa1/?ref=app
19th Mar 2018, 12:17 AM
AZTECCO
AZTECCO - avatar
18th Mar 2018, 12:09 PM
Ulisses Cruz
Ulisses Cruz - avatar
+ 8
Is 4^3 = 64 same as Math.pow(4,3) --> 4·4·4 = 64? i see "^" used alot i thought it just ment "xor" 😂
18th Mar 2018, 1:36 PM
D_Stark
D_Stark - avatar
+ 8
First Ruby Submission 😎😀😀😁😁 https://code.sololearn.com/cUt7Q42eoLix/?ref=app
18th Mar 2018, 4:08 PM
Vishal Pal❄️⚛️
Vishal Pal❄️⚛️ - avatar
+ 8
Checks all numbers in a range: https://code.sololearn.com/c8TU3hgoTmZa/?ref=app There seems to be a nice pattern 🤔
18th Mar 2018, 5:29 PM
Pedro Demingos
Pedro Demingos - avatar
19th Mar 2018, 9:56 PM
Med Arezki
Med Arezki - avatar
18th Mar 2018, 2:19 PM
Tomás Badenes
Tomás Badenes - avatar
20th Mar 2018, 12:55 PM
Rstar
Rstar - avatar