|
|
вернуться в форумWhy WA 1#? var s: array[1..50] of string; si, i1, i, c: integer; input, output: text; begin {$IFNDEF ONLINE_JUDGE} assign(input, 'input.txt'); reset(input); assign(output, 'output.txt'); rewrite(output); {$ENDIF} while not seekeof(input) do begin inc(si); read(input, s[si]); end; c := 1; for i := 1 to si do for i1 := 1 to length(s[i]) do begin if c = 0 then s[i][i1] := lowercase(s[i][i1]); if (c = 1) and (s[i][i1] <> ' ') and (s[i][i1] <> '-') and (s[i][i1] <> ':') then c := 0; if (s[i][i1] = '?') or (s[i][i1] = '.') or (s[i][i1] = '!') then c := 1; end;
for i := 1 to si do writeln(output, s[i]); {$IFNDEF ONLINE_JUDGE} close(input); close(output); {$ENDIF} end. |
|
|