Because of necessary software maintenance, Jutge.org may not fully work on the 7 of may, from 8 to 10 CEST.
Largest prime factor
P15695
Statement
html
Implement an efficient function
intlargest_prime_factor(intn);
that returns the largest prime factor of n.
Precondition
It holds n ≥ 2.
Observation
You only need to submit the required procedure;
your main program will be ignored.
About statements
The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.