結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2017-04-07 23:54:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 306 bytes |
コンパイル時間 | 608 ms |
コンパイル使用メモリ | 63,256 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-16 03:24:45 |
合計ジャッジ時間 | 1,143 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
ソースコード
#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 % mod; } printf("%llu\n", ans); } }