比赛 20101118 评测结果 AAATTTTTTT
题目名称 最终得分 30
用户昵称 reamb 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2010-11-18 10:05:57
显示代码纯文本
program ba;
var
  n,i,j,p,q,t:longint;
  a:array[1..15]of longint;
  biaozhi:boolean;
begin
  assign (input,'eight.in');
  reset (input);
  assign (output,'eight.out');
  rewrite (output);
    readln (n);
    for i:=1 to n do
      read (a[i]);
    readln;
    readln (p,q);
    for i:=p to q do
    begin
      if i mod 8 =0 then
      begin
        biaozhi:=false;
        for j:=1 to n do
          if i mod a[j]=0 then
          begin
            biaozhi:=true;
            break
          end;
        if biaozhi=false then
          t:=t+1
      end
    end;
    writeln (t);
  close (input);
  close (output)
end.