Pagini recente » Cod sursa (job #524854) | Cod sursa (job #263615) | Cod sursa (job #2195867) | Cod sursa (job #2326240) | Cod sursa (job #393578)
Cod sursa(job #393578)
var f,g:text;
c:char;
k,l:longint;
ok:boolean;
begin
assign(f,'text.in');
reset(f);
k:=0;
l:=0;
ok:=true;
while not eof(f) do begin
read(f,c);
if (c=' ')and(k=0) then k:=0
else
if k=0 then k:=1;
if (c=' ')and(ok=true) then begin
inc(k);
ok:=false;
end
else begin
inc(l);
ok:=true;
end;
end;
close(f);
assign(g,'text.out');
rewrite(g);
writeln(g,l div k);
close(g);
end.