結果
問題 |
No.500 階乗電卓
|
ユーザー |
|
提出日時 | 2020-05-04 17:46:09 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 293 bytes |
コンパイル時間 | 2,627 ms |
コンパイル使用メモリ | 190,648 KB |
最終ジャッジ日時 | 2025-01-10 06:25:24 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
ソースコード
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; using lint=long long; int main(){ lint n; cin>>n; if(n>=50){ puts("000000000000"); return 0; } lint ans=1; rep(i,n){ ans*=i+1; ans%=1000000000000LL; } printf("%lld\n",ans); return 0; }