結果

問題 No.500 階乗電卓
ユーザー maspymaspy
提出日時 2020-01-28 23:52:42
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 285 bytes
コンパイル時間 848 ms
コンパイル使用メモリ 10,540 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-10-13 20:59:56
合計ジャッジ時間 1,924 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 17 ms
8,604 KB
testcase_05 AC 16 ms
8,544 KB
testcase_06 AC 17 ms
8,624 KB
testcase_07 AC 16 ms
8,572 KB
testcase_08 AC 17 ms
8,676 KB
testcase_09 AC 17 ms
8,532 KB
testcase_10 AC 17 ms
8,676 KB
testcase_11 AC 17 ms
8,680 KB
testcase_12 AC 16 ms
8,668 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 16 ms
8,592 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

fact = [1] * 1000
for n in range(1,1000):
    fact[n] = fact[n-1] * n

if N >= 1000:
    answer = 0
else:
    answer = fact[N]
print(answer % (10**12))
0