标签:
NOIP1999普及组
Time Limit: 1000MS | Memory Limit: 30000K | |
Total Submissions: 9333 | Accepted: 5469 |
1/1 1/2 1/3 1/4 1/5 ...
2/1 2/2 2/3 2/4
3/1 3/2 3/3
4/1 4/2
5/1
3 14 7
TERM 3 IS 2/1 TERM 14 IS 2/4 TERM 7 IS 1/4
模拟打一个Cantor表。
var n,i,m:longint; procedure main; begin readln(n); m:=n; i:=1; while n>i do begin dec(n,i); inc(i) end; if i mod 2=1 then writeln(‘TERM ‘,m,‘ IS ‘,i+1-n,‘/‘,n) else writeln(‘TERM ‘,m,‘ IS ‘,n,‘/‘,i+1-n); end; begin while not seekeof do main; end.
标签:
原文地址:http://www.cnblogs.com/yangqingli/p/4908797.html