結果

問題 No.500 階乗電卓
ユーザー eve__fuyuki
提出日時 2018-03-14 04:48:04
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 322 bytes
コンパイル時間 521 ms
コンパイル使用メモリ 54,856 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-24 23:03:52
合計ジャッジ時間 1,455 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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