結果

問題 No.500 階乗電卓
ユーザー 0w10w1
提出日時 2017-04-09 19:39:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 107 ms / 2,000 ms
コード長 188 bytes
コンパイル時間 626 ms
コンパイル使用メモリ 86,616 KB
実行使用メモリ 76,012 KB
最終ジャッジ日時 2023-09-07 08:38:56
合計ジャッジ時間 3,681 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
75,920 KB
testcase_01 AC 106 ms
75,652 KB
testcase_02 AC 102 ms
75,940 KB
testcase_03 AC 103 ms
75,732 KB
testcase_04 AC 70 ms
71,056 KB
testcase_05 AC 70 ms
71,168 KB
testcase_06 AC 70 ms
71,364 KB
testcase_07 AC 70 ms
70,864 KB
testcase_08 AC 71 ms
70,992 KB
testcase_09 AC 72 ms
71,236 KB
testcase_10 AC 71 ms
71,088 KB
testcase_11 AC 71 ms
71,020 KB
testcase_12 AC 70 ms
71,024 KB
testcase_13 AC 71 ms
71,024 KB
testcase_14 AC 71 ms
71,396 KB
testcase_15 AC 68 ms
70,960 KB
testcase_16 AC 71 ms
71,084 KB
testcase_17 AC 71 ms
71,088 KB
testcase_18 AC 105 ms
76,012 KB
testcase_19 AC 106 ms
75,892 KB
testcase_20 AC 107 ms
75,836 KB
testcase_21 AC 104 ms
75,636 KB
testcase_22 AC 105 ms
75,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

f = 1
N = int( input() )
N = min( N, 10000 )
for i in range( 1, N + 1, 1 ):
  f *= i
ans = str( f % int( 1e12 ) )
while f > int( 1e12 ) and len( ans ) < 12:
  ans = "0" + ans
print( ans )
0