{"problem":{"name":"[NOIP 1999 普及组] Cantor 表","description":{"content":"现代数学的著名证明之一是 Georg Cantor 证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的： ![](https://cdn.luogu.com.cn/upload/image_hosting/jdjdaf73.png) 我们以 Z 字形给上表的每一项编号。第一项是 $1/1$，然后是 $1/2$，$2/1$，$3/1$，$2/2$，…","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":131072},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGP1014"},"statements":[{"statement_type":"Markdown","content":"现代数学的著名证明之一是 Georg Cantor 证明了有理数是可枚举的。他是用下面这一张表来证明这一命题的：\n\n![](https://cdn.luogu.com.cn/upload/image_hosting/jdjdaf73.png)\n\n我们以 Z 字形给上表的每一项编号。第一项是 $1/1$，然后是 $1/2$，$2/1$，$3/1$，$2/2$，…\n\n## Input\n\n整数 $N$（$1 \\leq N \\leq 10^7$）。\n\n## Output\n\n表中的第 $N$ 项。\n\n[samples]\n\n## Note\n\n- 2024-11-18 0:30 数据中加入了样例，放在不计分的子任务 2 中。","is_translate":false,"language":"English"}],"meta":{"iden":"LGP1014","tags":["模拟","数学","1999","NOIP 普及组","枚举"],"sample_group":[["7\n","1/4"]],"created_at":"2026-03-03 11:09:25"}}