結果

問題 No.500 階乗電卓
コンテスト
ユーザー hoshiimo28
提出日時 2017-04-08 00:39:09
言語 PyPy2
(7.3.15)
結果
RE  
実行時間 -
コード長 288 bytes
コンパイル時間 170 ms
コンパイル使用メモリ 77,216 KB
最終ジャッジ日時 2025-12-03 23:29:39
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 RE * 1
other AC * 14 RE * 6
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# python
import math

l =input()
l = int(l)
ans = 1
if l > 50:
    ans = '000000000000'
else:
    for num in range(l):
        ans *= l - num 
        if int(math.log10(ans) + 1 > 12):
            ans = str(ans)
            ans = ans[-12:].zfill(12)
            #ans = int(ans)
print(ans)
0