比赛 20101118 评测结果 AAATTTTTTT
题目名称 最终得分 30
用户昵称 sr-end 运行时间 0.000 s
代码语言 Pascal 内存使用 0.00 MiB
提交时间 2010-11-18 10:48:54
显示代码纯文本
program aa;
var
swap:longint;
ar:array[1..15] of longint;
n:shortint;
i,j,a,b,x:longint;
f,f1:text;
function zhen(x:integer):boolean;
var
j:integer;
k:integer;
begin
zhen:=true;
for j:=1 to n do
 if (i mod ar[j] =0) then begin
  zhen:=false;
  break;
  end;
end;
begin
 assign(f,'eight.in');assign(f1,'eight.out');
 reset(f);
 rewrite(f1);
 readln(f,n);
 for i:=1 to n do
 read(f,ar[i]);
 readln(f);
 read(f,a,b);
 for i:=1 to n-1 do
 for j:=i to n do
   if ar[i]>ar[j] then begin
   swap:=ar[i];
   ar[i]:=ar[j];
   ar[j]:=swap;
   end;
   for i:=a to b  do
   if (i mod 8=0)and zhen(ar[j]) then
    inc(x);
    write(f1,x);
    close(f);close(f1);

end.