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 1059. Expression

Is the testdata changed? I submit a solved program many times, but always get wa
Posted by aaakkk 23 Feb 2002 15:00
Who Can Post a just-solved program, I think it is hard to solve this
problem now.
I have tried my AC solution and it got WA! I suppose the test cases have really been changed. (+)
Posted by shitty.Mishka 23 Feb 2002 17:48
Here's my code which got AC before ...

Program Polynom;
 Var i,n:Word;
Begin
 Readln(n);
 Writeln(0);
 For i:=1 To n Do Begin
  Writeln('x');
  Writeln('*');
  Writeln(i);
  Writeln('+');
 End;
End.
Wu...........What Shall I Do??? I have submitted this problem for more than 20 times.
Posted by aaakkk 23 Feb 2002 18:35
Does it mean that your solution is wrong?
Posted by Nazarov Denis (nsc2001@rambler.ru) 23 Feb 2002 20:24
> Here's my code which got AC before ...
>
> Program Polynom;
>  Var i,n:Word;
> Begin
>  Readln(n);
>  Writeln(0);
>  For i:=1 To n Do Begin
>   Writeln('x');
>   Writeln('*');
>   Writeln(i);
>   Writeln('+');
>  End;
> End.
>
Now , Who can AC 1059 now, post your program,please.
Posted by aaakkk 24 Feb 2002 12:05
Same code, different results. Can any1 who got this question AC pls post source code?
Posted by William Hong 11 Mar 2002 18:07
My code is almost identical, but...

program expression;
var
i,j:word;

begin
readln(j);
writeln(0);
for i := 1 to j do begin
writeln('X');
writeln('*');
writeln(i);
writeln('+');
end;
end.

It gets Wrong Answer no matter whether the variables are integers or
words(the data types) . Does anyone know what is wrong with my code?
Also, if you have this problem accepted, i'll be most grateful if u
posted the source codes here, since i havent the faintest idea what
the question says and wants


> Here's my code which got AC before ...
>
> Program Polynom;
>  Var i,n:Word;
> Begin
>  Readln(n);
>  Writeln(0);
>  For i:=1 To n Do Begin
>   Writeln('x');
>   Writeln('*');
>   Writeln(i);
>   Writeln('+');
>  End;
> End.
>
Re: Does it mean that your solution is wrong?---Yes! It is wrong!
Posted by Juri Krainjukov 28 Nov 2002 00:08
> > Here's my code which got AC before ...
> >
> > Program Polynom;
> >  Var i,n:Word;
> > Begin
> >  Readln(n);
> >  Writeln(0);
> >  For i:=1 To n Do Begin
> >   Writeln('x');
> >   Writeln('*');
> >   Writeln(i);
> >   Writeln('+');
> >  End;
> > End.
> >

In fact, this solution is really wrong. I don't understand how it
could get AC before.

I got AC lately for this problem.
This is my solution:

var
    N:integer;
   i:integer;

begin
   readln(N);
   if n=0 then writeln(0) else
   begin
      writeln('0');
      writeln('X');
      writeln('*');
      for I:=1 to n-1 do
      begin
         writeln(i);
         writeln('+');
         writeln('X');
         writeln('*');
      end;
      writeln(n);
      writeln('+');
   end;
end.

And that is all...