結果

問題 No.500 階乗電卓
ユーザー 👑 CleyL
提出日時 2019-10-31 21:41:07
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 289 bytes
コンパイル時間 565 ms
コンパイル使用メモリ 64,204 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-14 22:11:32
合計ジャッジ時間 1,252 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
int main(){
    long long n;cin>>n;
    if(n >= 50){
        cout << "000000000000" << endl;
        return 0;
    }
    long long ans = 1;
    for(long long i = 1; n >= i; i++){
        ans = (ans*i)%1000000000000;
    }
    cout << ans << endl;
}
0