Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 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
42 Respostas
+ 23
https://code.sololearn.com/cX0XifP556fW/?ref=app
+ 31
My Solutin!! š
https://code.sololearn.com/c7VT6fYC914B/?ref=app
+ 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 !!
+ 25
Thanks to @LukArToDo šš
https://code.sololearn.com/cz8wPF2dlkkn/?ref=app
+ 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 šš
+ 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!! š¤
+ 20
@D_Stark āŗš
4^3 == 4*4*4
(24)^3 == 24*24*24
+ 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 š
+ 11
https://code.sololearn.com/cNZro4w1idTJ/?ref=app
+ 11
My solution :
https://code.sololearn.com/cg48P2cAZShH/?ref=app
+ 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
+ 9
here is my code:
https://code.sololearn.com/c01F6Y6lWV6e/?ref=app
+ 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" š
+ 8
First Ruby Submission ššššš
https://code.sololearn.com/cUt7Q42eoLix/?ref=app
+ 8
Checks all numbers in a range:
https://code.sololearn.com/c8TU3hgoTmZa/?ref=app
There seems to be a nice pattern š¤
+ 7