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_i(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_i() << std::endl; return 0; }