求Cantor表

题目描述 Description

输入描述 Input Description

输出描述 Output Description

样例输入 Sample Input

样例输出 Sample Output

1/4

 #include<iostream>
using namespace std;
int main()
{
long n,i=;
cin>>n;
while(n-i>)
{
n=n-i;
i++;
}
if(i%==)cout<<n<<"/"<<i+-n;
else cout<<i+-n<<"/"<<n;
}
05-08 08:37