結果

問題 No.1102 Remnants
ユーザー tyawanmusityawanmusi
提出日時 2020-07-03 21:57:36
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 890 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 112 ms
コンパイル使用メモリ 11,800 KB
実行使用メモリ 31,852 KB
最終ジャッジ日時 2023-10-17 02:10:16
合計ジャッジ時間 10,353 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,132 KB
testcase_01 AC 28 ms
10,132 KB
testcase_02 AC 28 ms
10,132 KB
testcase_03 AC 30 ms
10,132 KB
testcase_04 AC 29 ms
10,132 KB
testcase_05 AC 703 ms
27,420 KB
testcase_06 AC 141 ms
13,008 KB
testcase_07 AC 890 ms
31,852 KB
testcase_08 AC 42 ms
10,416 KB
testcase_09 AC 66 ms
10,916 KB
testcase_10 AC 36 ms
10,228 KB
testcase_11 AC 54 ms
10,688 KB
testcase_12 AC 68 ms
11,008 KB
testcase_13 AC 65 ms
10,968 KB
testcase_14 AC 407 ms
19,280 KB
testcase_15 AC 327 ms
16,672 KB
testcase_16 AC 820 ms
28,440 KB
testcase_17 AC 780 ms
27,616 KB
testcase_18 AC 809 ms
28,916 KB
testcase_19 AC 282 ms
16,340 KB
testcase_20 AC 105 ms
12,116 KB
testcase_21 AC 473 ms
21,344 KB
testcase_22 AC 657 ms
26,052 KB
testcase_23 AC 516 ms
22,324 KB
testcase_24 AC 376 ms
18,976 KB
testcase_25 AC 776 ms
29,408 KB
testcase_26 AC 71 ms
11,160 KB
testcase_27 AC 225 ms
14,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k,*a=map(int,open(0).read().split());m=10**9+7;d=1
for i in range(1,n):d=d*(k+i)*pow(i,m-2,m)%m;a[i]*=d;a[-i-1]*=d
print(sum(a)%m)
0