mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-18 07:31:58 +00:00
20 lines
235 B
C++
20 lines
235 B
C++
|
#include <iostream>
|
||
|
|
||
|
using std::cin;
|
||
|
using std::cout;
|
||
|
const char endl = '\n';
|
||
|
|
||
|
int n, res = 1;
|
||
|
|
||
|
int main() {
|
||
|
std::ios::sync_with_stdio(false);
|
||
|
|
||
|
cin >> n;
|
||
|
|
||
|
while (res *= n--, n) {}
|
||
|
|
||
|
cout << res << endl;
|
||
|
|
||
|
return 0;
|
||
|
}
|