讨论 / 。。寻高人再看个题目~
zjlsykw3636 2008-08-18 21:38:00
点我顶贴 收藏 删除
var

bu:boolean;

min,i,j,zong,d1,d2:longint;

a,b:array[1..50] of longint;

begin

readln(d1);

for i:=1 to d1 do

readln(a[i]);

readln(d2);

for i:=1 to d2 do

readln(b[i]);

min:=1000000001;

for i:=1 to d2 do

if b[i]<min then min:=b[i];

for i:=1 to b[i] do

begin

bu:=true;

for j:=1 to d1 do

if (i mod a[j]<>0) then bu:=false;

for j:=1 to d2 do

if (b[j] mod i<>0) then bu:=false;

if bu=true then inc(zong);

end;

writeln(zong);

end.

测试结果1:

通过本测试点|有效耗时46:ms

测试结果2:

测试结果错误.

错误结果为:0

正确结果应为:100

测试结果3:

测试结果错误.

错误结果为:0

正确结果应为:2

测试结果4:

测试结果错误.

错误结果为:0

正确结果应为:1

测试结果5:

测试结果错误.

错误结果为:0

正确结果应为:2

测试结果6:

测试结果错误.

错误结果为:0

正确结果应为:4

测试结果7:

通过本测试点|有效耗时47:ms

测试结果8:

通过本测试点|有效耗时62:ms

测试结果9:

通过本测试点|有效耗时47:ms

测试结果10:

测试结果错误.

错误结果为:4

正确结果应为:9

??帮我看看什么原因 谢~

查看更多回复
提交回复