The Intersection

TimeLimit:3000MS  MemoryLimit:32768KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

A given coefficient K leads an intersection of two curves f(x) and gK(x). In the first quadrant, the curve f is a monotone increasing function that f(x)=√x. The curve g is decreasing and g(x)=K/x.
To calculate the x-coordinate of the only intersection in the first quadrant is the following question. For accuracy, we need the nearest rational number to x and its denominator should not be larger than 100000.

Input

The first line is an integer T (1≤T≤100000) which is the number of test cases.
For each test case, there is a line containing the integer K (1≤K≤100000), which is the only coefficient.

Output

For each test case, output the nearest rational number to x. Express the answer in the simplest fraction.

SampleInput
5
1
2
3
4
5
SampleOutput
1/1
153008/96389
50623/24337
96389/38252
226164/77347
Submit
题目统计信息详细
总AC数1
通过人数1
尝试人数1
总提交量4
AC率25.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: