通过变量计算函数的值:
Pestiferous (n)
r = 0;
for i = 1 to n do
for j = 1 to i do
for k = j to i + j do
for l = 1 to i + j - k do
r = r + 1;
return (r)
我尝试计算总和,得到r = n(n + 1)(n + 2)(n + 3) / 24
,但答案没有通过计算机检查。