|
|
back to boardWA#10 help? please! Posted by Insaf 14 Aug 2009 15:28 Please help me with WA#10. Can you give me the test in which my program outputs this WA. program Project1; {$LONGSTRINGS ON} {$APPTYPE CONSOLE} uses SysUtils; var c,lc:char; ans:longint; b:boolean; begin {$IFNDEF ONLINE_JUDGE} reset(input,'input.txt'); rewrite(output,'output.txt'); {$ENDIF} ans := 0; b := false; c := #1; while not eof(input) do begin lc := c; read(c); if (c in ['a'..'z']) and (not b) then inc(ans); if (c in ['A'..'Z']) and (lc in (['A'..'Z'] + ['a'..'z'])) then inc(ans); if not (c in ['.','?','!',' ',#10,#13]) then b := true; if c in ['.','?','!'] then b := false; end; write(ans); end. Re: WA#10 help? please! -a. Answer is 1, but your program gives 0. Re: WA#10 help? please! My program give rigth answer for test : input: -a. output: 1 WHY I HAVE WA10????????!!!!!!!!!!!!!!! Re: WA#10 help? please! Posted by fredAC 31 Aug 2009 08:52 if you failed on test 10,try the follwing data or see the item Posted by Alam Md Mahabub September 27, 2001 14:23 ****************************************** Re: Can you give any judge data for which this code gives WA. Posted by SHMAK November 05, 2007 05:17 /*************************************** strange... but there are 5 mistakes: The old va[R]sag my Antonesgh..%[s]g4mahng 35tsavx 3mnkxb o o oo A[A] gfsd . [s]dgw a a[A] Aa ********************************* the weild part is that the last sentence doesnot contain a full stop, a question-mark or an exclamation mark
Re: WA#10 help? please! What means '%'? Re: WA#10 help? please! for me WA10 got away after i added check for digits in my condition to start new word. e.g. "A0B" have 0 errors |
|
|