Cantor±í¡¾NOIP1999ÆÕ¼°×é¡¿
Time Limit:10000MS Memory Limit:65536K
Total Submit:12 Accepted:12
Description
ÏÖ´úÊýѧµÄÖøÃûÖ¤Ã÷Ö®Ò»ÊÇGeorg CantorÖ¤Ã÷ÁËÓÐÀíÊýÊÇ¿Éö¾ÙµÄ¡£ËûÊÇÓÃÏÂÃæÕâÒ»ÕűíÀ´Ö¤Ã÷ÕâÒ»ÃüÌâµÄ£º
ÎÒÃÇÒÔZ×ÖÐθøÉϱíµÄÿһÏî±àºÅ¡£µÚÒ»ÏîÊÇ1/1£¬È»ºóÊÇ1/2£¬2/1£¬3/1£¬2/2£¬¡
Input
Ò»ÐУ¬ÕûÊýN£¨1¡ÜN¡Ü10000000£©
Output
±íÖеĵÚNÏî
Sample Input
7
Sample Output
1/4
Source
? ? ? ? ? ? ? ? ? ? ? ?
var
i,j,n,k,l:longint; begin
readln(n); k:=1; l:=1;
while n>k do begin n:=n-k; inc(l); k:=k+1; end;
if odd(l) then writeln(l+1-n,'/',n) else writeln(n,'/',l+1-n); end.