Pagini recente » Cod sursa (job #1127145) | Istoria paginii preoni-2006/runda-4/clasament-10 | Cod sursa (job #370074) | Cod sursa (job #872327) | Cod sursa (job #1089294)
var c :char;
k,l,i,j : longint;
begin
assign(input,'text.in'); reset(input);
assign(output,'text.out'); rewrite(output);
i:=1;
while not eof(input) do begin
read(c);
j:=1;
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='-' then i:=i+1;
if (c='-') and (i<>2) then k:=k+1;
if (j=1) and (i=1) and (c<>' ') and (c<>'-') then k:=k+1;
IF c=' ' THEN k:=k+1;
if (c='.') or (c='!') or (c='?') then begin i:=1; j:=j+1; end;
end;
writeln(l div k);
close(input); close(output);
end.