結果
| 問題 |
No.502 階乗を計算するだけ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-21 20:44:55 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 247 bytes |
| コンパイル時間 | 596 ms |
| コンパイル使用メモリ | 55,120 KB |
| 実行使用メモリ | 13,760 KB |
| 最終ジャッジ日時 | 2024-07-20 05:12:33 |
| 合計ジャッジ時間 | 3,484 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#include <iostream>
using namespace std;
const unsigned long N = 1000000007;
int main() {
unsigned long x;
cin >> x;
unsigned long y = 1;
for (unsigned long i = 1; i <= x; i++) {
y = y * i % N;
}
cout << y << endl;
return 0;
}