显示代码纯文本
		
		program meal;
var
  tot,ans,n,i,j,k,A,B,C,p1,p2,p3,best:longint;
begin
  assign(input,'meal.in');  reset(input);
  assign(output,'meal.out');rewrite(output);
  readln(A,B,C,p1,p2,p3,n);
  tot:=0; best:=0;
  for i:=1 to n do begin
    read(k);inc(tot,k);
  end;
  for i:=1 to 100 do
    for j:=1 to 100 do
      for k:=1 to 100 do
        if i*p1+j*p2+k*p3<=tot then begin
          ans:=maxlongint;
          if ans>i div A then ans:=i div A;
          if ans>j div B then ans:=j div B;
          if ans>k div C then ans:=k div C;
          if ans>best then best:=ans;
        end;
  writeln(best);
  close(input); close(output);
end.