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

Обсуждение задачи 1601. АнтиКАПС

Why I got WA 21 test.
Послано AlexeyPechenin 7 окт 2008 01:34
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.
Послано DM^Dude (Kherson State University) 14 мар 2009 20:41
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.
Послано Jonathan Livingston 9 окт 2011 19:17
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
DM^Dude (Kherson State University) писал(a) 14 марта 2009 20:41
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.
Послано Plamen_N 8 авг 2012 01:32
For this test case:
- AAA.
- BBB
- CCC.

my accepted program gives:
- Aaa.
- Bbb
- ccc.