結果

問題 No.502 階乗を計算するだけ
ユーザー tenp1729tenp1729
提出日時 2024-04-23 17:47:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 82,280 KB
実行使用メモリ 59,660 KB
最終ジャッジ日時 2024-04-23 17:48:28
合計ジャッジ時間 10,360 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
51,968 KB
testcase_01 AC 35 ms
51,712 KB
testcase_02 AC 36 ms
52,224 KB
testcase_03 AC 38 ms
51,968 KB
testcase_04 AC 35 ms
51,712 KB
testcase_05 AC 36 ms
51,968 KB
testcase_06 AC 35 ms
52,352 KB
testcase_07 AC 35 ms
51,712 KB
testcase_08 AC 36 ms
51,584 KB
testcase_09 AC 34 ms
51,584 KB
testcase_10 AC 36 ms
51,584 KB
testcase_11 AC 34 ms
51,712 KB
testcase_12 AC 34 ms
51,968 KB
testcase_13 AC 36 ms
51,712 KB
testcase_14 AC 38 ms
52,224 KB
testcase_15 AC 37 ms
51,968 KB
testcase_16 AC 36 ms
51,584 KB
testcase_17 AC 39 ms
51,712 KB
testcase_18 AC 37 ms
51,584 KB
testcase_19 AC 39 ms
51,584 KB
testcase_20 AC 41 ms
52,224 KB
testcase_21 AC 39 ms
51,840 KB
testcase_22 AC 45 ms
57,216 KB
testcase_23 AC 38 ms
57,600 KB
testcase_24 AC 40 ms
57,600 KB
testcase_25 AC 37 ms
57,592 KB
testcase_26 AC 38 ms
57,856 KB
testcase_27 AC 36 ms
57,600 KB
testcase_28 AC 38 ms
57,600 KB
testcase_29 AC 43 ms
57,600 KB
testcase_30 AC 45 ms
57,600 KB
testcase_31 AC 44 ms
57,600 KB
testcase_32 AC 259 ms
57,472 KB
testcase_33 AC 670 ms
57,472 KB
testcase_34 AC 461 ms
57,600 KB
testcase_35 AC 223 ms
57,600 KB
testcase_36 AC 456 ms
57,600 KB
testcase_37 AC 556 ms
57,344 KB
testcase_38 AC 454 ms
57,856 KB
testcase_39 AC 654 ms
57,600 KB
testcase_40 AC 50 ms
57,600 KB
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
mod = 10**9+7
f = [1, 927880474, 933245637, 668123525, 429277690, 733333339, 724464507, 957939114, 203191898, 586445753]
n = int(input())
i = min(n//(10**8), 9)
j = n%(10**8)
ans = f[i]
for k in range(1, j+1):
    ans = (ans*((10**8)*i+k))%mod
print(ans)
0