結果
問題 |
No.502 階乗を計算するだけ
|
ユーザー |
|
提出日時 | 2017-04-07 23:36:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 247 bytes |
コンパイル時間 | 212 ms |
コンパイル使用メモリ | 31,360 KB |
実行使用メモリ | 14,016 KB |
最終ジャッジ日時 | 2024-07-16 03:15:43 |
合計ジャッジ時間 | 3,230 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#include "cstdio" int main() { int mod = 1000000007; long long d; scanf("%lld", &d); if (d >= mod) { printf("0\n"); return 0; } long long r = 1; for (int i = 1; i <= d; i++) { r = r * i % mod; } printf("%d\n", r); return 0; }