题解 | #n的阶乘#
n的阶乘
https://www.nowcoder.com/practice/97be22ee50b14cccad2787998ca628c8
#include <stdio.h> typedef long long ll; ll fun(ll a) { if(a==0||a==1) { return 1; } else { return a*fun(a-1); } } int main() { ll a; scanf("%d",&a); printf("%lld",fun(a)); return 0; }