summaryrefslogtreecommitdiff
path: root/6p4.cpp
blob: 28c6fa57fae46470ed3d5e15c8b26d8a6f263028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>

/*
 *
 * 6.4
 *
 *
 */

uint64_t fact(void) {
	
	uint64_t val;
	if(std::cin >> val) {} else { return 0; }
	uint64_t ret = 1;
	while(val > 1) {
		ret *= val--;
	}
	
	return ret;
}

int main () {

	std::cout << fact() << std::endl;
	return 0;
}