0019 - Factorial / AizuOnlineJudge
#include <iostream> using namespace std; void Solve(int n) { long long int answer=1; for(int i=1; i<=n; ++i) answer*=i; cout << answer << endl; } int main(void) { int n; cin >> n; Solve(n); return 0; }
与えられた数字まで掛け上げていき、出力する。
~了~