其实是数学题

P1014 [NOIP1999 普及组] Cantor 表

![](https://cdn.luogu.com.cn/upload/pic/8792.png)
by 超威蓝猫 @ 2017-10-08 17:44:46


https://cdn.luogu.com.cn/upload/pic/8792.png 还有这种操作???
by strangers @ 2017-10-08 18:33:04


什么意思???
by zhangyuanyang @ 2017-10-23 17:02:06


```cpp #include <iostream> using namespace std; int main() { int n,g=0; cin>>n; while(n>0) n-=++g; if(g%2) cout<<1-n<<'/'<<g+n; else cout<<n+g<<'/'<<1-n; return 0; } ```
by Zenurik @ 2017-11-25 11:30:01


神操作啊
by holiday_1999 @ 2018-05-07 20:55:33


n=int(input()) k=0 while n-k>0: n=n-k k=k+1 if k%2==0: print("{}/{}".format(n,k+1-n)) else: print("{}/{}".format(k+1-n,n)) 哈哈所见略同
by buaaxxr @ 2020-02-13 19:20:18


@[buaaxxr](/user/184754) tqltql,小白苦思冥想一个小时
by ccecust @ 2022-01-18 17:10:28


|