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

题目解答

题目:
program program4;
const
u: array[0..2] of integer = (1, -3, 2);
v: array[0..1] of integer = (-2, 3);
var
i, n, sum: integer;
function g(n: integer): integer;
var i, sum: integer;
begin
sum := 0;
for i := 1 to n do inc(sum, u[i mod 3] * i);
g := sum;
end;
begin
sum := 0;
read(n);
for i := 1 to n do inc(sum, v[i mod 2] * g(i));
writeln(sum);
end.
输入:103
输出:-400
考点:
分析:
解答:
评论:
老师: