不是VIP会员,不能显示答案

题目解答

题目:
program program2;
var
i, number, ndata, sum: integer;
data: array[1..100] of integer;
procedure solve(s, sign, n: integer);
var i: integer;
begin
for i := s to ndata do begin
inc(sum, sign * (number div (n * data[i])));
solve(i + 1, -sign, n * data[i]);
end;
end;
begin
read(number ,ndata);
sum := 0;
for i := 1 to ndata do read(data[i]);
solve(1, 1, 1);
writeln(sum);
end.
输入:1000 3 5 13 11
输出:328
考点:
分析:
解答:
评论:
老师: