PersonalCorpus 版 (精华区)

154533 06:13:37 5 Mar 2002
Bozhang,HIT,P.R.China 1068 Pascal Accepted 0.02 sec 49K


var
    n,sum:integer;
begin
    readln(n);
    if n=0 then sum:=1 else if n<0 then sum:=1+ ((1-n)*n div 2) else sum:=(1
+n)*n div 2;
    writeln(sum);
end.
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.541毫秒