結果

問題 No.500 階乗電卓
ユーザー nohakai3
提出日時 2022-11-02 10:29:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 58 ms / 2,000 ms
コード長 257 bytes
コンパイル時間 590 ms
コンパイル使用メモリ 82,300 KB
実行使用メモリ 59,152 KB
最終ジャッジ日時 2024-07-16 17:44:37
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

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