結果
問題 |
No.502 階乗を計算するだけ
|
ユーザー |
|
提出日時 | 2017-04-07 22:57:02 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 187 bytes |
コンパイル時間 | 764 ms |
コンパイル使用メモリ | 63,752 KB |
実行使用メモリ | 13,884 KB |
最終ジャッジ日時 | 2024-07-16 02:50:34 |
合計ジャッジ時間 | 3,460 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 32 TLE * 1 -- * 19 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; main() { long n;cin>>n; long M=1e9+7; if(n>=M)cout<<0<<endl; else { long ans=1; for(long i=2;i<=n;i++)ans=ans*i%M; cout<<ans<<endl; } }