#P1014. [NOIP 1999 普及组] Cantor 表
[NOIP 1999 普及组] Cantor 表
Description
One of the famous proofs in modern mathematics is Georg Cantor's proof that the rational numbers are countable. He used the following table to prove this statement:

We number each entry of the table in a Z-shaped order. The first entry is , then , , , , …
Input Format
An integer ().
Output Format
The -th term in the table.
7
1/4
Hint
- 2024-11-18 00:30 Samples were added to the testdata and placed in the non-scoring Subtask 2.
Translated by ChatGPT 5
京公网安备 11011102002149号