Pagini recente » Cod sursa (job #1491340) | Cod sursa (job #2097153) | Cod sursa (job #1883847) | Cod sursa (job #583997) | Cod sursa (job #584727)
Cod sursa(job #584727)
var c:char;
g,s,u:longint;
begin
assign(input,'text.in');reset(input);
assign(output,'text.out');rewrite(output);
g:=0;
s:=0;
u:=0;
while not eof(input) do begin
read(c);
if (upcase(c) in['A'..'Z']) then inc(g) else begin
if g<>0 then begin
s:=s+g;
inc(u);
g:=0;
end;
end;
end;
if g<>0 then begin
inc(u);
s:=s+g;
g:=0;
end;
write(s div u);
close(output);
end.