結果
| 問題 | No.502 階乗を計算するだけ |
| コンテスト | |
| ユーザー |
Naoyk1212
|
| 提出日時 | 2017-04-08 00:14:08 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 252 bytes |
| コンパイル時間 | 2,266 ms |
| コンパイル使用メモリ | 158,100 KB |
| 実行使用メモリ | 814,464 KB |
| 最終ジャッジ日時 | 2024-07-16 03:30:19 |
| 合計ジャッジ時間 | 3,982 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 WA * 19 MLE * 1 -- * 19 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define int long long
const int mod = 1e9 + 1;
int fact(int n){
if(n == 0){
return 1;
}else{
return ((n % mod) * fact(n - 1)) % mod;
}
}
signed main(){
int n;
cin >> n;
cout << fact(n) << endl;
}
Naoyk1212