結果

問題 No.1102 Remnants
ユーザー tyawanmusi
提出日時 2020-07-03 21:57:36
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 1,096 ms / 2,000 ms
コード長 132 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 12,288 KB
実行使用メモリ 32,620 KB
最終ジャッジ日時 2024-09-17 00:44:23
合計ジャッジ時間 11,891 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

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