結果
| 問題 | No.502 階乗を計算するだけ |
| コンテスト | |
| ユーザー |
rsk0315
|
| 提出日時 | 2020-04-08 04:30:44 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 275 bytes |
| 記録 | |
| コンパイル時間 | 133 ms |
| コンパイル使用メモリ | 38,528 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-06-09 09:33:57 |
| 合計ジャッジ時間 | 3,466 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#include <cstdio>
#include <cstdint>
intmax_t const mod = 1000'000'007;
int main() {
intmax_t n;
scanf("%jd", &n);
if (n >= mod) return puts("0"), 0;
intmax_t res = 1;
for (intmax_t i = 1; i <= n; ++i) (res *= i) %= mod;
printf("%jd\n", res);
}
rsk0315