#C199. Largest Prime Factor
Largest Prime Factor
Largest Prime Factor
Given a positive integer \(n\) (with \(n > 1\)), your task is to find the largest prime factor of \(n\). A prime factor of \(n\) is a prime number that divides \(n\) without leaving a remainder. In mathematical terms, if \(p\) is a prime factor of \(n\), then \(p \mid n\). The answer for a prime number is the number itself.
Input: A single integer \(n\) from standard input.
Output: Output the largest prime factor of \(n\) to standard output.
inputFormat
The input consists of a single integer (n) provided via standard input. You can assume (n > 1).
outputFormat
Output a single integer representing the largest prime factor of the input number (n) to standard output.## sample
56
7