結果

問題 No.500 階乗電卓
ユーザー parukiparuki
提出日時 2017-04-07 23:01:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 225 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 10,644 KB
実行使用メモリ 8,004 KB
最終ジャッジ日時 2023-09-23 02:30:56
合計ジャッジ時間 1,537 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 AC 15 ms
7,868 KB
testcase_05 AC 16 ms
7,772 KB
testcase_06 RE -
testcase_07 AC 17 ms
7,776 KB
testcase_08 AC 16 ms
7,864 KB
testcase_09 AC 16 ms
7,872 KB
testcase_10 AC 15 ms
7,844 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ans=1
for i in range(1, N+1):
    ans*=i
    if ans%(10**12)==0:
        break
if ans==0:
    print("0"*12)
else:
    if ans>=10**12:
        print("0"*(12-len(ans%(10**12))), end="")
    print(ans%(10**12))
0