Cod sursa(job #168395)
| Utilizator | Data | 31 martie 2008 11:43:45 | |
|---|---|---|---|
| Problema | Text | Scor | 40 |
| Compilator | fpc | Status | done |
| Runda | Arhiva de probleme | Marime | 0.49 kb |
var i,l,ls,c:longint;
s:ansistring;
begin
assign(input,'text.in'); reset(input);
assign(output,'text.out'); rewrite(output);
readln(s);
for i:=1 to length(s) do begin
if ((ord(s[i])>64) and (ord(s[i])<91)) or ((ord(s[i])>96) and (ord(s[i])<123)) then begin
inc(l); inc(ls);
end
else begin
if ls>0 then inc(c);
ls:=0;
end;
end;
if ls>0 then inc(c);
if c=0 then writeln(0)
else writeln(trunc(l/c));
close(input); close(output);
end.
