|
|
back to boardIs 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. (+) 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? > 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? 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! > > 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... |
|
|