Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
tekashi4611021dWhat have you tried so far?
4160Tuesdays5021dI need help in this?
inaba524421dRust isn't functional right? So by the sound of it you're about to split a number into it's prime factors.
Basically what you wanna do is take the number, ckeck if you can divide it by two, then ever time you can you add 2 to the result array and then divide the number by 2. Then when you can't divide by 2 any more you (make a new loop where you) check if you can divide by three (then 5, 7, 9, all of the uneven numbers until the iterating number is less than the number you're checking), where you check for division by three (then 5, 7, etc) and if that is possible you divide the number by three and add three to the result array.
Or if you want to cheat and look at code https://github.com/inabahare/...
SomeNone20321dThis is devRant, not devHelp… that said, please search for Euler problem 3, it is very similar, and a solution to that is quite trivial to modify so it does what you want. Solutions in all sorts of languages can be easily found.