+ 7
Largest prime factor
Hey guys. I wrote a code to find largest prime factor of a given input, it works perfectly fine but only upto seven digits. How will I be able to get output for larger digits.? https://code.sololearn.com/c566YcPrh8W6/?ref=app
5 Antworten
+ 4
Night fury you can make use of long long int, int is too small to hold such value
your code look so troublesome, like doing lots of unnecessary things
https://code.sololearn.com/ceNaeMPuHuwF/?ref=app
+ 9
Anya I ran this code on ubuntu terminal. It gave output till 7 digits only. If u can improve this code it would be great.
+ 8
I tried it on my program by replacing int by long long int.. worked perfectly.. thanks a lot 👍🏻
+ 5
*AsterisK* need help 😥
+ 1
The resources to represent the output is attached to the size of your output (in this case specifically).
Remember this is plataform dependent. In another system can run 8 digits or less.
So if you want to increase the size you can try to:
1: Find a equivalent code that have better performance.
2: Use approximation. This will permit to use less resources but your result will have a percentage of error.