当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3560:Supersquare

Special Judge 特殊评判
题目描述

Let number A be a precise square if there exists natural number B such that B*B = A.

2n-digit number without leading zeroes is called a supersquare if it is a precise square and both n-digit numbers which are formed from its n first digits and its n last digits are precise squares. The second n-digit number dndn-1…d1 formed from n last digits may have leading zeroes but must not be equal zero.

You need to write a program which constructs a 2n-digit number which is supersquare.

输入解释

The input contains several test cases. The first line contains the number of test cases T (1 ≤ T ≤ 10). Each of the next T lines describes one test case and contains an integer number n (1 ≤ n ≤ 500).

输出解释

The output consists of T lines, one line per each test case. Each line contains 2n-digit supersquare number. If several solutions are possible only one of them should be given. When it is impossible to construct 2n-digit supersquare, the line must contain NO SUPERSQUARE POSSIBLE phrase.

输入样例
2
1
2
输出样例
49
1681

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3560

最后修改于 2020-10-29T07:04:33+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536