結果

問題 No.1281 Cigarette Distribution
ユーザー brthyyjp
提出日時 2020-11-06 23:28:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 243 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 96,000 KB
最終ジャッジ日時 2024-07-22 13:45:56
合計ジャッジ時間 3,532 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
mod = 10**9+7
ans = []
for x in range(1, m+1):
    temp = 1
    q, r = divmod(n+1, x)
    temp *= pow(q+1, r, mod)*pow(q, x-r-1, mod)*(q-1)
    temp %= mod
    ans.append(temp)
print(*ans, sep='\n')
0