标签:int += ret ++i src scan www idt nbsp
//Serene #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<cstdio> #include<cmath> using namespace std; const int maxn=1e7+10; int n,tot,x,y; int main() { scanf("%d",&n); for(int i=1;i<=n;++i) { tot+=i; if(tot>=n) { tot-=i; x=i; y=(i&1)? i-(n-tot)+1:n-tot; x=x-y+1; printf("%d/%d",y,x); break; } } return 0; }
标签:int += ret ++i src scan www idt nbsp
原文地址:http://www.cnblogs.com/Serene-shixinyi/p/7628792.html