結果

問題 No.500 階乗電卓
ユーザー roarisroaris
提出日時 2019-07-28 12:56:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 259 bytes
コンパイル時間 739 ms
コンパイル使用メモリ 10,608 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-09-15 11:27:46
合計ジャッジ時間 1,763 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 17 ms
7,816 KB
testcase_02 AC 16 ms
7,804 KB
testcase_03 AC 16 ms
7,848 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 16 ms
7,728 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 16 ms
7,848 KB
testcase_12 AC 16 ms
7,812 KB
testcase_13 AC 16 ms
7,796 KB
testcase_14 AC 16 ms
7,840 KB
testcase_15 AC 17 ms
7,824 KB
testcase_16 AC 16 ms
7,800 KB
testcase_17 AC 16 ms
8,004 KB
testcase_18 AC 16 ms
7,888 KB
testcase_19 AC 16 ms
7,816 KB
testcase_20 AC 16 ms
7,956 KB
testcase_21 AC 17 ms
7,884 KB
testcase_22 AC 15 ms
7,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial as fact

N = int(input())
#50!は10で12回割り切れる。49!は11回。よって、50以上の整数xに対してx!の下12桁は全て0
if N >= 50:
    print('000000000000')
else:
    print(str(fact(N) % (10 ** 12)).zfill(12))
0