結果
| 問題 |
No.502 階乗を計算するだけ
|
| コンテスト | |
| ユーザー |
777yuuki12323
|
| 提出日時 | 2017-04-08 00:45:51 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 457 bytes |
| コンパイル時間 | 562 ms |
| コンパイル使用メモリ | 62,156 KB |
| 実行使用メモリ | 69,100 KB |
| 最終ジャッジ日時 | 2024-07-16 03:34:57 |
| 合計ジャッジ時間 | 3,584 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 TLE * 1 -- * 19 |
ソースコード
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <map>
typedef long long ll;
#define fi first
#define se second
using namespace std;
ll N;
ll ans;
ll mod = 1000000007;
//123456789
int main(){
cin>>N;
int i;
ans = 1;
if( N < mod ){
while( N ){
ans *= N;
ans %= mod;
N--;
}
cout<<ans<<endl;
}
else{
cout<<"0"<<endl;
}
return 0;
}
777yuuki12323