#GESP2615. [GESP]L4-202409-Q2615-S
[GESP]L4-202409-Q2615-S
下面代码采用递推算法来实现整数 的阶乘($n! = n \times (n - 1) \times \ldots \times 2 \times 1$),则横线上应填写( )。
int factorial(int n) {
int result = 1;
for (int i = 2; i <= n; i++) {
// 在此处填入代码
}
return result;
}
{{ select(1) }}
result *= i;result += i;result *= result;result += result;
相关
在下列比赛中: