数据范围n <= 10所以直接做就行
#include <bits/stdc++.h>
using namespace std ;
int res = 1 ;
int n ;
void d ( int x ) {
res *= x ;
if ( x == n ) return ; // 终止条件
else d ( x + 1 ) ; // 继续做
}
int main ( ) {
cin >> n ;
d ( 1 ) ;
cout << res ;
return 0 ;
}