結果

問題 No.500 階乗電卓
ユーザー kk
提出日時 2020-08-14 13:47:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 470 ms
コンパイル使用メモリ 82,312 KB
実行使用メモリ 54,076 KB
最終ジャッジ日時 2024-04-18 18:33:04
合計ジャッジ時間 2,170 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,956 KB
testcase_01 AC 37 ms
53,288 KB
testcase_02 AC 37 ms
52,792 KB
testcase_03 AC 37 ms
51,984 KB
testcase_04 AC 38 ms
52,068 KB
testcase_05 AC 38 ms
52,760 KB
testcase_06 AC 36 ms
54,076 KB
testcase_07 AC 37 ms
51,868 KB
testcase_08 AC 36 ms
53,036 KB
testcase_09 AC 36 ms
52,108 KB
testcase_10 AC 37 ms
53,288 KB
testcase_11 AC 37 ms
52,540 KB
testcase_12 AC 37 ms
53,428 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 37 ms
52,856 KB
testcase_16 AC 37 ms
52,412 KB
testcase_17 AC 37 ms
52,856 KB
testcase_18 AC 37 ms
53,504 KB
testcase_19 AC 37 ms
53,008 KB
testcase_20 AC 37 ms
53,360 KB
testcase_21 AC 37 ms
52,696 KB
testcase_22 AC 37 ms
53,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def factorial(x):
    if x == 0:
        return 1
    return x * factorial(x-1)

def solve(n):
    if n < 100:
        return factorial(n) % 1000000000000
    return 0

def main():
    n = int(input())
    ret = solve(n)
    if ret == 0:
        print("000000000000")
    else:
        print(ret)

if __name__ == '__main__':
    main()
    
    
0