結果
問題 |
No.616 へんなソート
|
ユーザー |
![]() |
提出日時 | 2021-05-06 05:07:23 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 328 bytes |
コンパイル時間 | 368 ms |
コンパイル使用メモリ | 81,844 KB |
実行使用メモリ | 87,840 KB |
最終ジャッジ日時 | 2024-09-13 21:11:36 |
合計ジャッジ時間 | 11,496 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 TLE * 2 -- * 1 |
ソースコード
def polymul(f,g): lf = len(f) lg = len(g) res = [0]*(lf+lg-1) for i in range(lf): for j in range(lg): res[i+j] += f[i]*g[j] res[i+j] %= MOD return res MOD = 10**9+7 n,k = map(int,input().split()) a = [1] for i in range(n): a = polymul(a,[1]*(i+1)) print(sum(a[:k+1])%MOD)