The magic number 23
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given a positive integer N, find an integer K such that:
the number of KK (repeated twice decimal representation of K) is a perfect square of some integer (see examples);
K for entry in the decimal system has a length from N to N +23 (inclusive).
Thus, for N = 1 condition is satisfied, for example, the number of K = 13223140496, as it has a length of 11, which fits in the range from 1 to 24, and the number 1322314049613223140496 is a perfect square integer.
Input
We introduce a single integer N (1 ≤ N ≤ 2323).
Output
Display the desired number K. If the numbers that satisfy the condition, several output any of them. If these numbers do not exist, output 0.
Examples
Input #1
Answer #1
Submissions 79
Acceptance rate 22%