eolymp
bolt
Спробуйте наш новий інтерфейс для відправки розв'язків
Задачі

Hip To Be Square

Hip To Be Square

None of the numbers \textbf{6}, \textbf{10}, \textbf{15} is a square, but their product, the number \textbf{900}, is a square. We are interested in sets of positive integers, the product of which is a square. We call such a set HIP (this stands for Has Interesting Product). Evidently \{\textbf{6}, \textbf{10}, \textbf{15}\} is HIP, and so is \{\textbf{25}\}. More generally, given a set of positive integers, does it have a non-empty subset which is HIP, and if so, for which of the HIP subsets will the product be minimal? To make things slightly easier for you, we restrict our attention to intervals. \InputFile \includegraphics{https://static.e-olymp.com/content/fb/fb0a73480c796fe405fb9418c1dae538852aef64.jpg} Each test case consists of two integers \textbf{a} and \textbf{b} on a single line (\textbf{1} < \textbf{a} < \textbf{b} ≤ \textbf{4900}). These integers describe the interval . \OutputFile \includegraphics{https://static.e-olymp.com/content/6e/6ef42d78bffdcbe0ef4771493c2fc270c9499474.jpg} For each test case, print the least number \textbf{k} such that the product of the elements of some non-empty subset \textbf{XA} equals \textbf{k^2}. If no such number exists, print '\textbf{none}'. The number \textbf{k} will be less than \textbf{2^63}.
Ліміт часу 1 секунда
Ліміт використання пам'яті 64 MiB
Вхідні дані #1
20 30
101 110
2337 2392
Вихідні дані #1
5
none
3580746020392020480
Джерело NWERC 2012 - NorthWestern European Regional Championship 2012