Cod sursa(job #1089354)
Utilizator | Data | 21 ianuarie 2014 17:25:33 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 1.12 kb |
var c :char;
k,l,i,J : longint;
begin
assign(input,'text.in'); reset(input);
assign(output,'text.out'); rewrite(output);
i:=1; J:=1;
while not eof(input) do begin
read(c);
if (ord(c)>=65) and (ord(c)<=90) then l:=l+1;
if (ord(c)>=97) and (ord(c)<=122) then l:=l+1;
if (c='-') and (i<>1) then k:=k+1;
if (i=1) and (c<>' ') and (c<>'-') then k:=k+1;
IF (c=' ') AND (J=1) THEN k:=k+1;
i:=i+1;
if c='.' then BEGIN i:=1; J:=1; END;
end;
writeln(l div k);
close(input); close(output);
end.