結果
問題 |
No.502 階乗を計算するだけ
|
ユーザー |
|
提出日時 | 2017-01-14 08:25:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 279 bytes |
コンパイル時間 | 791 ms |
コンパイル使用メモリ | 63,360 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-12-21 12:40:15 |
合計ジャッジ時間 | 39,743 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 TLE * 19 |
ソースコード
#include <iostream> #define repeat(i,n) for (int i = 0; (i) < int(n); ++(i)) using ll = long long; using namespace std; const int mod = 1e9+7; int main() { ll n; cin >> n; ll x = 1; for (ll i = 1; i <= n; ++ i) x = x * i % mod; cout << x << endl; return 0; }