ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1059. Выражение

Is the testdata changed? I submit a solved program many times, but always get wa
Послано aaakkk 23 фев 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. (+)
Послано shitty.Mishka 23 фев 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.
Послано aaakkk 23 фев 2002 18:35
Does it mean that your solution is wrong?
Послано Nazarov Denis (nsc2001@rambler.ru) 23 фев 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.
Послано aaakkk 24 фев 2002 12:05
Same code, different results. Can any1 who got this question AC pls post source code?
Послано William Hong 11 мар 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!
Послано Juri Krainjukov 28 ноя 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...