PersonalCorpus 版 (精华区)
156467 04:42:48 7 Mar 2002
Bozhang,HIT,P.R.China 1149 Pascal Accepted 0.03 sec 53K
var
i,s:integer;
procedure PrintA(a:integer);
var i:integer;
begin
for i:=1 to a-1 do begin
write('sin(',i);
if odd(i) then write('-') else write('+');
end;
write('sin(',a);
for i:=1 to a do write(')');
end;
begin
readln(s);
if s=0 then halt;
for i:=1 to s-1 do write('(');
for i:=1 to s-1 do begin
PrintA(i);
write('+',s+1-i,')');
end;
PrintA(s);
write('+1');
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:3.650毫秒