We call a positive integer an antiprime if it has more divisors than any positive integer less than that number. Example antiprime numbers are: 1, 2, 4, 6, 12, 24.
Task
Write a program which:
reads from the standard input a positive integer ,
computes the largest antiprime number not greater than ,
writes the result to the standard output.
Input
The first and only line of standard input contains a single integer , .
Output
In the only line of standard output your program should write one integer - the largest antiprime number not greater than .
Example
For the input data:
1000
the correct result is:
840
Task author: Wojciech Rytter.
Kontakt
W razie problemów technicznych ze Szkopułem, prosimy o kontakt mailowy pod adresem szkopul@fri.edu.pl.
Jeśli chciałbyś porozmawiać o zadaniach, rozwiązaniach lub problemach technicznych, odwiedź nasze serwery na Discordzie. Są one moderowane przez społeczność, ale członkowie zespołu wsparcia również aktywnie się tam udzielają.