結果

問題 No.500 階乗電卓
ユーザー nohakai3nohakai3
提出日時 2022-11-02 10:29:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 1,628 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 71,372 KB
最終ジャッジ日時 2023-09-23 17:51:02
合計ジャッジ時間 5,686 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,940 KB
testcase_01 AC 75 ms
70,724 KB
testcase_02 AC 75 ms
71,072 KB
testcase_03 AC 75 ms
71,332 KB
testcase_04 AC 75 ms
70,860 KB
testcase_05 AC 75 ms
71,160 KB
testcase_06 AC 77 ms
71,092 KB
testcase_07 AC 74 ms
71,112 KB
testcase_08 AC 74 ms
71,276 KB
testcase_09 AC 75 ms
71,124 KB
testcase_10 AC 75 ms
70,864 KB
testcase_11 AC 76 ms
71,144 KB
testcase_12 AC 76 ms
70,952 KB
testcase_13 AC 75 ms
70,720 KB
testcase_14 AC 75 ms
70,860 KB
testcase_15 AC 75 ms
71,088 KB
testcase_16 AC 74 ms
71,372 KB
testcase_17 AC 73 ms
71,208 KB
testcase_18 AC 74 ms
70,952 KB
testcase_19 AC 73 ms
71,236 KB
testcase_20 AC 74 ms
70,944 KB
testcase_21 AC 74 ms
71,204 KB
testcase_22 AC 74 ms
71,116 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import factorial

n=int(input())
if n<=100:
    ans=[]
    for i in range(min(len(str(factorial(n))),12)):
        k=str(factorial(n))
        ans.append(k[-(i+1)])
    ans=ans[::-1]
    ans="".join(ans)
    print(ans)

if n>100:
    print("0"*12)
0