結果

問題 No.500 階乗電卓
ユーザー 👑 yumechiyumechi
提出日時 2017-04-07 23:38:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 83 ms / 2,000 ms
コード長 196 bytes
コンパイル時間 392 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 71,240 KB
最終ジャッジ日時 2023-09-07 08:33:58
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
70,840 KB
testcase_01 AC 81 ms
71,028 KB
testcase_02 AC 83 ms
70,916 KB
testcase_03 AC 74 ms
71,168 KB
testcase_04 AC 76 ms
70,924 KB
testcase_05 AC 75 ms
71,084 KB
testcase_06 AC 74 ms
71,132 KB
testcase_07 AC 72 ms
71,224 KB
testcase_08 AC 72 ms
71,156 KB
testcase_09 AC 73 ms
70,912 KB
testcase_10 AC 70 ms
71,164 KB
testcase_11 AC 67 ms
70,872 KB
testcase_12 AC 65 ms
71,096 KB
testcase_13 AC 67 ms
71,176 KB
testcase_14 AC 65 ms
70,904 KB
testcase_15 AC 65 ms
70,984 KB
testcase_16 AC 66 ms
71,092 KB
testcase_17 AC 66 ms
70,880 KB
testcase_18 AC 64 ms
70,928 KB
testcase_19 AC 68 ms
71,104 KB
testcase_20 AC 65 ms
70,896 KB
testcase_21 AC 63 ms
71,240 KB
testcase_22 AC 63 ms
70,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ans = ""
t = 1
for i in range(1, int(input()) + 1):
    t *= i
    ans = str(t)
    if len(ans) > 12:
        ans = ans[len(ans)-12:]
        if ans == "000000000000":
            break
print(ans)
0