結果
問題 | No.500 階乗電卓 |
ユーザー |
|
提出日時 | 2019-08-17 23:03:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 2,208 ms |
コンパイル使用メモリ | 192,608 KB |
最終ジャッジ日時 | 2025-01-07 13:55:19 |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n; cin>>n; if (n>=50) puts("000000000000"); else { ll p=1; for (int i=2;i<=n;i++) p=p*i%1000000000000; if (n>=15) cout<<setfill('0')<<setw(12); cout<<p<<endl; } return 0; }