結果
問題 | No.500 階乗電卓 |
ユーザー |
![]() |
提出日時 | 2017-04-07 22:54:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,611 bytes |
コンパイル時間 | 1,340 ms |
コンパイル使用メモリ | 160,868 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 02:52:06 |
合計ジャッジ時間 | 2,154 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> VI; typedef vector<VI> VVI; typedef vector<ll> VL; typedef vector<VL> VVL; typedef pair<int, int> PII; #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i) #define REP(i, n) FOR(i, 0, n) #define ALL(x) x.begin(), x.end() #define MP make_pair #define PB push_back #define MOD 1000000007 #define INF (1LL << 30) #define LLINF (1LL << 60) #define PI 3.14159265359 #define EPS 1e-12 #define int ll string a[] = {"1", "2", "6", "24", "120", "720", "5040", "40320", "362880", "3628800", "39916800", "479001600", "6227020800", "87178291200", "307674368000", "922789888000", "687428096000", "373705728000", "100408832000", "008176640000", "171709440000", "777607680000", "884976640000", "239439360000", "985984000000", "635584000000", "160768000000", "501504000000", "543616000000", "308480000000", "562880000000", "012160000000", "401280000000", "643520000000", "523200000000", "835200000000", "902400000000", "291200000000", "356800000000", "272000000000", "152000000000", "384000000000", "512000000000", "528000000000", "760000000000", "960000000000", "120000000000", "760000000000", "240000000000"}; signed main(void) { int n; cin >> n; if(n > 49) cout << "000000000000" << endl; else cout << a[n-1] << endl; return 0; }