可以通过打表发现答案就是 。
#include <bits/stdc++.h>
using namespace std ;
long long n ;
__int128 mul = 1 ;
void write(__int128 x) {
if(x > 9) {
write(x / 10) ;
}
cout << char(x % 10 + '0') ;
}
int main() {
cin >> n ;
for(long long i = n ; i >= 1 ; i --) {
mul *= i ;
}
write(mul) ;
return 0 ;
}
- 时间复杂度:。
- 空间复杂度:。
暂无评论