結果
| 問題 | No.500 階乗電卓 |
| コンテスト | |
| ユーザー |
taba
|
| 提出日時 | 2017-05-18 03:08:31 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 348 bytes |
| 記録 | |
| コンパイル時間 | 480 ms |
| コンパイル使用メモリ | 69,564 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-17 21:13:12 |
| 合計ジャッジ時間 | 1,352 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 20 |
ソースコード
#include <cstdio>
#include <cstring>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
using namespace std;
int main(){
uint64_t n,m=1;
int _=scanf("%ld",&n);
for(uint64_t i=1;i<=n&&m;++i){
m*=i;
m%=1000000000000L;
printf("%lu %lu\n",i,m);
}
printf(n>16?"%012lu\n":"%lu\n",m);
return 0;
}
taba