Pagini recente » Rating spataru andra (andra_madalina22) | Cod sursa (job #2066713) | Istoria paginii runda/jjaa/clasament | Cod sursa (job #2020059) | Cod sursa (job #215833)
Cod sursa(job #215833)
var
s,s1: string;
lcuv,stot,ct,nrcuv: integer;
f,g: text;
ok: boolean;
begin
assign(f,'text.in');
reset(f);
assign(g,'text.out');
rewrite(g);
readln(f,s);
close(f);
ok:=false;
ct:=1; nrcuv:=0; stot:=0; ok:=false; s1:=s;
while ct<>length(s) do
begin
if ((s1[ct]<='z') and (s1[ct]>='a')) or ((s1[ct]<='Z') and (s1[ct]>='A'))
then begin
inc(lcuv);
inc(stot);
end
else if ((s1[ct+1]<='z') and (s1[ct+1]>='a')) or ((s1[ct+1]<='Z') and (s1[ct+1]>='A'))
then inc(nrcuv);
lcuv:=0;
inc(ct);
end;
if ((s1[1]<='z') and (s1[1]>='a')) or ((s1[1]<='Z') and (s1[1]>='A')) then inc(nrcuv);
write(g,trunc(stot/nrcuv));
close(g);
end.