結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
p4mf
|
| 提出日時 | 2017-04-08 00:00:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 306 bytes |
| コンパイル時間 | 529 ms |
| コンパイル使用メモリ | 64,460 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-16 03:27:02 |
| 合計ジャッジ時間 | 1,479 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 17 WA * 3 |
ソースコード
#include <cstdio>
#include <iostream>
using namespace std;
typedef long long ll;
const ll mod = 1000000000000;
int main() {
ll N;
cin >> N;
if(N>=50) {
printf("000000000000\n");
} else {
ll ans=1;
for (ll i=2;i<=N;i+=1){
ans = ans * i;
}
printf("%llu\n", ans % mod);
}
}
p4mf