eolymp
bolt
Try our new interface for solving problems
Problems

The magic number 23

The magic number 23

Given a positive integer \textbf{N}, find an integer \textbf{K} such that: \begin{itemize} \item the number of \textbf{KK} (repeated twice decimal representation of \textbf{K}) is a perfect square of some integer (see examples); \item \textbf{K} for entry in the decimal system has a length from \textbf{N} to \textbf{N +23} (inclusive). \end{itemize} Thus, for \textbf{N = 1} condition is satisfied, for example, the number of \textbf{K = 13223140496}, as it has a length of \textbf{11}, which fits in the range from \textbf{1} to \textbf{24}, and the number \textbf{1322314049613223140496} is a perfect square integer. \InputFile We introduce a single integer \textbf{N} (\textbf{1} ≤ \textbf{N} ≤ \textbf{2323}). \OutputFile Display the desired number \textbf{K}. If the numbers that satisfy the condition, several output any of them. If these numbers do not exist, output \textbf{0}.
Time limit 1 second
Memory limit 64 MiB
Input example #1
1
Output example #1
13223140496