結果
問題 |
No.500 階乗電卓
|
ユーザー |
![]() |
提出日時 | 2017-06-26 23:16:30 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 321 bytes |
コンパイル時間 | 424 ms |
コンパイル使用メモリ | 58,640 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-04 09:53:37 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 18 WA * 2 |
ソースコード
#include<stdio.h> #include <iostream> #include <cstring> #include <math.h> using namespace std; int main(){ int n; cin>>n; if(n>=50){ cout<<"000000000000"<<endl; return 0; } long long a=1; for(int i=1;i<=n;i++){ a=(a*i)%1000000000000; //cout<<a<<endl; } cout<<a<<endl; return 0; }