ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1149. Sinus Dances

could anybody help me?Whats wrong with my program?
Posted by Reinforcement 4 Jan 2003 19:22
Program T1149;
Var i,n:1..200;
    op:text;
Procedure a(p:integer);
Var i,j:integer;
Begin
     For  i:=1 to p do Begin
          write('sin');
          if i=p then Begin write('(',i,')');break;end
          else If odd(i) then write('(',i,'-')
                         else write('(',i,'+');
          end;
end;

Procedure s(n:integer);
Var i,j,k:integer;
Begin
     k:=n;
     For i:=1 to n-1 do write('(');
     For i:=1 to n-1 do Begin
         a(i);write('+',k-i+1,')');
         End;
     a(n);
end;

Begin
     Readln(n);
     s(n);
     For i:=1 to n-1 do write(')');write('+1');
     Readln
End.
Re: could anybody help me?Whats wrong with my program?
Posted by Sylap 7 Oct 2012 01:21
You get WA on test #1.
Can't you fix it yourself?