結果

問題 No.500 階乗電卓
ユーザー hoshiimo28hoshiimo28
提出日時 2017-04-08 00:02:59
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 278 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 6,484 KB
実行使用メモリ 6,436 KB
最終ジャッジ日時 2023-09-23 03:09:19
合計ジャッジ時間 1,599 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 12 ms
6,180 KB
testcase_01 AC 12 ms
6,072 KB
testcase_02 AC 12 ms
6,160 KB
testcase_03 AC 12 ms
6,180 KB
testcase_04 AC 11 ms
6,368 KB
testcase_05 AC 12 ms
6,424 KB
testcase_06 AC 12 ms
6,352 KB
testcase_07 AC 12 ms
6,196 KB
testcase_08 AC 12 ms
6,364 KB
testcase_09 AC 12 ms
6,364 KB
testcase_10 AC 11 ms
6,300 KB
testcase_11 AC 13 ms
6,388 KB
testcase_12 AC 12 ms
6,280 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 12 ms
6,260 KB
testcase_16 AC 12 ms
6,100 KB
testcase_17 AC 13 ms
6,048 KB
testcase_18 AC 13 ms
6,132 KB
testcase_19 AC 12 ms
6,176 KB
testcase_20 AC 12 ms
6,092 KB
testcase_21 AC 12 ms
6,164 KB
testcase_22 AC 12 ms
6,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# 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:]
            ans = int(ans)

print(ans)
0