Pagini recente » Cod sursa (job #293525) | Cod sursa (job #1185362) | Cod sursa (job #2077671) | Cod sursa (job #1267258) | Cod sursa (job #170754)
Cod sursa(job #170754)
var
s:ansistring;
f:text;
n,k,c,i:longint;
begin
assign(f,'text.in');
reset(f);
read(f,s);
n:=0;
k:=0;
c:=0;
for i:=1 to length(s) do
if not (s[i] in['a'..'z']) and not (s[i] in ['A'..'Z']) then
begin
if c<>0 then
begin
n:=n+c;
k:=k+1;
end;
c:=0;
end
else c:=c+1;
close(f);
assign(f,'text.out');
rewrite(f);
write(f, trunc(n/k));
close(f);
end.