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

建议使用的浏览器:

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

3005:The Different World

题目描述
The conflict between two-dimensional world TWO and three-dimensional world THREE had lasted for thousands years.Until the THREE won the TWO on the world war,this conflict was finished by the result----the TWO became the colonial country of THREE.
People of TWO became the slaves of THREE.The king of THREE decided to establish a monument to remember this historic event.
The monument is one cube for King's preference.The small cube which has one unit length is the material to build this monument,and the slaves had to finish this project.
The King had many strict requirements.
(1)The workers can not move the materials until the materials can form a flat square.
(2)Only m workers to move the material.
(3)In the process of moving,the first worker only can move the square which has length k+1,the second can move k+2's square,and so on,the mth worker move the lenth k+m's square.
When all the materials have reached the target,the workers find that the king is an outstanding mathematician.Because the materials can just build one monument has length m.For example m=47,k=21,can build the monument with length m.
Follow all the requriments,with different m and k, how many cube can be the king's monument?Could you sort all the monument with length by ascending sort.Then,when the king wants the Nth monument,could you give out the m and k of the Nth monument.The last problem is the important.
输入解释
The input contains many test cases.Each test case contains only one line of one integer, N(N<=100).When N=0,the input file is end.
输出解释
Each test case output two integers in one line,m and k for Nth monument,separate by one space.
输入样例
1
2
0
输出样例
47 21
2161 988  
来自杭电HDUOJ的附加信息
Recommend gaojie

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

源链接: HDU-3005

最后修改于 2020-10-25T22:59:07+00:00 由爬虫自动更新

共提交 0

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