Pagini recente » Cod sursa (job #1300455) | Cod sursa (job #1199130) | Cod sursa (job #2723817) | Cod sursa (job #1822752) | Cod sursa (job #1631463)
var q,x,y:int64;
c:char;
function ch(x:char):boolean;
begin
if ((ord(x)>64) and (ord(x)<91)) or ((ord(x)>96) and (ord(x)<123)) then ch:=true else ch:=false;
end;
procedure lire;
begin
assign(input,'text.in');
reset(input);
q:=0;
x:=0;
y:=0;
while not(eof) do
begin
read(c);
if ch(c) then x:=x+1 else begin q:=q+x; if x<>0 then y:=y+1; x:=0; end;
end;
close(input);
end;
procedure ecrire;
begin
assign(output,'text.out');
rewrite(output);
write(q div y);
close(output);
end;
begin
lire;
ecrire;
end.