Pagini recente » Clasament eusebiu_oji_2011_cls9 | Cod sursa (job #404204) | Cod sursa (job #2753810) | Cod sursa (job #619304) | Cod sursa (job #535720)
Cod sursa(job #535720)
program sdasda;
var s,s1:string;
i,lung,lungmax,c:integer;
lungmed:real;
f,g:text;
begin
assign(f,'text.in'); reset(f);
assign(g,'text.out'); rewrite(g);
read(f,s);
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(s1,s[i-1])>0 then
c:=c+1
else
i:=i+1;
end;
i:=i+1;
end;
write(g,trunc(lungmax/c));
close(f);
close(g);
end.