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

建议使用的浏览器:

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

4342:History repeat itself

题目描述
Tom took the Discrete Mathematics course in the 2011,but his bad attendance angered Professor Lee who is in charge of the course. Therefore, Professor Lee decided to let Tom face a hard probability problem, and announced that if he fail to slove the problem there would be no way for Tom to pass the final exam.
As a result , Tom passed.
History repeat itself. You, the bad boy, also angered the Professor Lee when September Ends. You have to faced the problem too.
The problem comes that You must find the N-th positive non-square number M and printed it. And that's for normal bad student, such as Tom. But the real bad student has to calculate the formula below.

So, that you can really understand WHAT A BAD STUDENT YOU ARE!!
输入解释
There is a number (T)in the first line , tell you the number of test cases below. For the next T lines, there is just one number on the each line which tell you the N of the case.
To simplified the problem , The N will be within 231 and more then 0.
输出解释
For each test case, print the N-th non square number and the result of the formula.
输入样例
4
1
3
6
10
输出样例
2 2
5 7
8 13
13 28
来自杭电HDUOJ的附加信息
Author HIT
Recommend zhuyuanchen520

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-4342

最后修改于 2020-10-25T23:12:37+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)