Pagini recente » Cod sursa (job #1503551) | Cod sursa (job #1935281) | Cod sursa (job #1075800) | Cod sursa (job #2569237) | Cod sursa (job #535754)
Cod sursa(job #535754)
program sdasda;
var s,s1:string;
i,lung,lungmax,c:integer;
f,g:text;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
read(f,s);
lung:=0;
lungmax:=0;
c:=0;
s1:='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
i:=1;
while i<=length(s)+1 do
begin
if pos(s[i],s1)>0 then
lung:=lung+1
else
begin
lungmax:=lungmax+lung;
lung:=0;
if pos(s[i-1],s1)>0 then
c:=c+1
else
i:=i+1;
end;
i:=i+1;
end;
write(g,trunc(lungmax/c));
close(f);
close(g);
end.