結果

問題 No.500 階乗電卓
ユーザー ngtkanangtkana
提出日時 2020-03-18 00:40:13
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,636 bytes
コンパイル時間 1,859 ms
コンパイル使用メモリ 200,844 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-05-08 01:55:19
合計ジャッジ時間 2,601 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 1 ms
6,944 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 1 ms
6,940 KB
testcase_12 AC 1 ms
6,944 KB
testcase_13 AC 1 ms
6,944 KB
testcase_14 AC 1 ms
6,944 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 2 ms
6,940 KB
testcase_17 AC 2 ms
6,940 KB
testcase_18 AC 2 ms
6,940 KB
testcase_19 AC 2 ms
6,944 KB
testcase_20 AC 1 ms
6,944 KB
testcase_21 AC 1 ms
6,944 KB
testcase_22 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using lint=long long;
int main(){
    std::cin.tie(nullptr);std::ios_base::sync_with_stdio(false);
    std::cout.setf(std::ios_base::fixed);std::cout.precision(15);
    lint n;std::cin>>n;
    std::cout<<(
        n==1?"1":
        n==2?"2":
        n==3?"6":
        n==4?"24":
        n==5?"120":
        n==6?"720":
        n==7?"5040":
        n==8?"40320":
        n==9?"362880":
        n==10?"3628800":
        n==11?"39916800":
        n==12?"479001600":
        n==13?"6227020800":
        n==14?"87178291200":
        n==15?"307674368000":
        n==16?"922789888000":
        n==17?"687428096000":
        n==18?"373705728000":
        n==19?"100408832000":
        n==20?"008176640000":
        n==21?"171709440000":
        n==22?"777607680000":
        n==23?"884976640000":
        n==24?"239439360000":
        n==25?"985984000000":
        n==26?"635584000000":
        n==27?"160768000000":
        n==28?"501504000000":
        n==29?"543616000000":
        n==30?"308480000000":
        n==31?"562880000000":
        n==32?"012160000000":
        n==33?"401280000000":
        n==34?"643520000000":
        n==35?"523200000000":
        n==36?"835200000000":
        n==37?"902400000000":
        n==38?"291200000000":
        n==39?"356800000000":
        n==40?"272000000000":
        n==41?"152000000000":
        n==42?"384000000000":
        n==43?"512000000000":
        n==44?"528000000000":
        n==45?"760000000000":
        n==46?"960000000000":
        n==47?"120000000000":
        n==48?"760000000000":
        n==49?"240000000000":
        "000000000000")
        <<'\n';
}
0