CF1916D Mathematical Problem
Description
The mathematicians of the 31st lyceum were given the following task:
You are given an odd number $ n $ , and you need to find $ n $ different numbers that are squares of integers. But it's not that simple. Each number should have a length of $ n $ (and should not have leading zeros), and the multiset of digits of all the numbers should be the same. For example, for $ \mathtt{234} $ and $ \mathtt{432} $ , and $ \mathtt{11223} $ and $ \mathtt{32211} $ , the multisets of digits are the same, but for $ \mathtt{123} $ and $ \mathtt{112233} $ , they are not.
The mathematicians couldn't solve this problem. Can you?
Input Format
N/A
Output Format
N/A
Explanation/Hint
Below are the squares of the numbers that are the answers for the second test case:
$ \mathtt{169} $ = $ \mathtt{13}^2 $
$ \mathtt{196} $ = $ \mathtt{14}^2 $
$ \mathtt{961} $ = $ \mathtt{31}^2 $
Below are the squares of the numbers that are the answers for the third test case:
$ \mathtt{16384} $ = $ \mathtt{128}^2 $
$ \mathtt{31684} $ = $ \mathtt{178}^2 $
$ \mathtt{36481} $ = $ \mathtt{191}^2 $
$ \mathtt{38416} $ = $ \mathtt{196}^2 $
$ \mathtt{43681} $ = $ \mathtt{209}^2 $