long long unsigned factorial(long long unsigned num){ return num < 2LL? 1LL : (factorial(num - 1LL) * num);}long long unsigned factoricalSum(long long unsigned num){ return num < 2LL? 1LL : factoricalSum(num - 1LL) + factorial(num);}
long long unsigned factoricalSum(long long unsigned num){ functionfactorial; factorial = [&factorial](decltype(num) n){ return n < 2LL? 1LL : (factorial(n - 1LL) * n);}; return num < 2LL? 1LL : factoricalSum(num - 1LL) + factorial(num);}
原创 禁转