結果
問題 |
No.502 階乗を計算するだけ
|
ユーザー |
![]() |
提出日時 | 2019-01-05 23:34:40 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 301 bytes |
コンパイル時間 | 1,726 ms |
コンパイル使用メモリ | 191,396 KB |
最終ジャッジ日時 | 2025-01-06 20:11:16 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 43 TLE * 9 |
ソースコード
#include<bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; int main() { int64 N; cin >> N; if(N >= mod) { cout << 0 << endl; return 0; } int64 mul = 1; for(int i = 2; i <= N; i++) { mul *= i; mul %= mod; } cout << mul << endl; }