#P1463. Largest Anti-Prime
Largest Anti-Prime
Largest Anti-Prime
For any positive integer \( x \), let \( g(x) \) denote the number of divisors of \( x \). For example, \( g(1)=1 \) and \( g(6)=4 \). If a positive integer \( x \) satisfies \( g(x) > g(i) \) for every positive integer \( i \) with \( 0 < i < x \), then \( x \) is called an anti-prime (or highly composite number). For instance, \( 1, 2, 4, 6 \) are anti-prime numbers.
Given a number \( N \), find the largest anti-prime that does not exceed \( N \).
Note: All formulas are given in \( \LaTeX \) format.
inputFormat
The input consists of a single integer N (1 ≤ N).
outputFormat
Output the largest anti-prime (highly composite number) that is less than or equal to N.
sample
1
1