#D. 【NOIP1999】cantor表

    Type: Default 1000ms 256MiB

【NOIP1999】cantor表

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

现代数学的著名证明之一是Georg Cantor证明了有理数是可枚举的。

他是用下面这一张表来证明这一命题的:

1/1 1/2 1/3 1/4 1/5 …

2/1 2/2 2/3 2/4 …

3/1 3/2 3/3 …

4/1 4/2 …

5/1 …

我们以Z字形给上表的每一项编号。 第一项是1/1,然后是1/2,2/1,3/1,2/2,…

Input Format

输入:整数N(1≤N≤10000000)

Output Format

输出:表中的第N项

Sample

input

7

output

1/4

Hint

时间限制:1s1 \text {s}

空间限制:256MB256 \text {MB}

20221123--模拟赛

Not Attended
Status
Done
Rule
OI
Problem
4
Start at
2022-11-23 7:40
End at
2022-11-23 12:00
Duration
4.3 hour(s)
Host
Partic.
25