| 
 | 
вернуться в форумWhy I got WA 21 test. This is my code:   {$APPTYPE CONSOLE} uses   SysUtils; var    s: string;    f: boolean;    newstr: string;    i: integer;   begin  //assign(input, 'input.txt'); reset(input); // assign(output, 'output.txt'); rewrite(output);    f:=true;   while not eof do    begin     readln(s);     newstr:='';     s:=LowerCase(s);     // process        for i:=1 to length(s) do       begin        if f and (s[i] <> ' ') and (s[i] <> ',') and (s[i] <> '!')             and (s[i] <> '?') and (s[i] <> '.') then        begin         newstr:=newstr + UpCase(s[i]);         f:= false;        end        else newstr:=newstr + s[i];          if (s[i] = '?') or (s[i] = '!') or (s[i] = '.') then              f:=true;       end;      writeln(newstr);    end;   end. Re: Why I got WA 21 test. Послано  me 14 окт 2008 23:27 i have got the same problem. Can anyoune help us? Re: Why I got WA 21 test. Послано  SochiX 14 ноя 2008 20:58 Anyone HELP ME! I have this problem tooo! Re: Why I got WA 21 test. In 21 test first symbol is not a letter. May be it's help you Re: Why I got WA 21 test. Послано  Giga 31 авг 2011 02:36 -AA. -BB   Answer is   -Aa. -Bb Re: Why I got WA 21 test. Something more. There is possible situation: - AAA. - BBB - CCC. And coorect result is: - Aaa. - Bbb - Ccc. (Difference is in space after '-' and new line starts with upper cased char inspite of the fact, there was no any dot or ! or ? at the end of previous line) So, if you'll ask me, I'll say that such conditions aren't fair. Author should mention such details in condition, I suppose. Re: Why I got WA 21 test. Послано  vpro 29 июн 2012 22:15 In 21 test first symbol is not a letter. May be it's help you Thank you. It's true. Re: Why I got WA 21 test. For this test case: - AAA. - BBB - CCC.   my accepted program gives: - Aaa. - Bbb - ccc.  |  
  | 
|