Every positive integer greater than 1 can be expressed as a product of prime numbers. For example, the prime factors of 13195 are 5, 7, 13 and 29. Given a number n, find its largest prime factor.
Example 1:
Example 2:
Example 3:
Constraints:
2 <= n <= 10^15
Tags:
