0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 18:36:26 +00:00
OI-codes/AcWing/819/819.cpp

21 lines
252 B
C++

#include <iostream>
using std::cin;
using std::cout;
const char endl = '\n';
int f(int x) {
return x == 1 ? 1 : x * f(x - 1);
}
int n;
int main() {
std::ios::sync_with_stdio(false);
cin >> n;
cout << f(n) << endl;
return 0;
}