結果
問題 |
No.502 階乗を計算するだけ
|
ユーザー |
|
提出日時 | 2017-05-05 02:49:09 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 495 ms |
コンパイル使用メモリ | 53,852 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-09-14 07:19:33 |
合計ジャッジ時間 | 3,454 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#include <iostream> using namespace std; struct iostream_init_struct { iostream_init_struct() { std::cin.tie(0); std::cin.sync_with_stdio(false); } } iostream_init; int main(void) { long long n; cin >> n; long long ans = 1; for (long long i = 2; i <= n; ++i) { ans = (ans * i) % 1000000007; } cout << ans << endl; }