結果
| 問題 |
No.500 階乗電卓
|
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2017-08-03 13:17:16 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 354 bytes |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 55,640 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 20:22:07 |
| 合計ジャッジ時間 | 1,356 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 17 WA * 3 |
ソースコード
#include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
long long int N;
int main(){
cin >> N;
if(N>=50)printf("000000000000\n");
else{
long long int ans=1;
for(long long int i=1;i<=N;i++){
ans=(ans*i) % 100000000000;
}
if(N<15)printf("%lld\n",ans);
else printf("%012lld\n",ans);
}
return 0;
}
notetonous