Pagini recente » Cod sursa (job #2987953) | Cod sursa (job #596161) | Cod sursa (job #1665831) | Cod sursa (job #3242318) | Cod sursa (job #129081)
Cod sursa(job #129081)
var k,c:longint;
m:set of 'a'..'z';
n:set of 'A'..'Z';
f,g:text;
p:boolean;
ch:char;
begin
assign(f,'text.in');
assign(g,'text.out');
reset(f);
rewrite(g);
c:=0;
k:=0;
m:=['a'..'z'];
n:=['A'..'Z'];
p:=false;
while not seekeof(f) do begin
while not seekeoln(f) do
begin
read(f,ch);
if ch in m+n then begin
inc(k);
p:=false;
end
else if (k>0) and (not p) then begin
inc(c);
p:=true;
end;
end;
if ch in m+n then begin
inc(c);
p:=true;
end;
readln(f);
end;
write(g,k div c);
close(f);
close(g);
end.