#include<bits/stdc++.h>
using namespace std;
int main(){
int n,i,k;
cin>>n;
int tot=0;
for(i=1;;i++){
tot+=i;
if(tot>n)break;
}
tot-=i;
i--;
for(k=1;k<=n-tot+1;k++){
}
if(n%2==1)cout<<i+1-k<<'/'<<k;
else cout<<k<<'/'<<i+1-k;
return 0;
}
虽然看题解过了但还看不明白我的算法为什么有错(前面这代码0分了)