problem
solution
codes
#include<iostream>
using namespace std;
int main(){
int n, k=1; cin>>n;
//1.第n个数在第k条斜线上(前k条斜线的数的个数为等差数列)
while((1+k)*k/2 < n)k++;
int s = n-(1+k-1)*(k-1)/2;
//2.偶数从上往下
if(k%2==0)cout<<s<<"/"<<k+1-s<<"\n";
else cout<<k+1-s<<"/"<<s<<"\n";
return 0;
}