結果

問題 No.1281 Cigarette Distribution
ユーザー brthyyjpbrthyyjp
提出日時 2020-11-06 23:28:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 284 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 264 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 96,628 KB
最終ジャッジ日時 2023-09-29 19:40:51
合計ジャッジ時間 4,733 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,272 KB
testcase_01 AC 70 ms
71,520 KB
testcase_02 AC 69 ms
71,408 KB
testcase_03 AC 70 ms
71,524 KB
testcase_04 AC 70 ms
71,400 KB
testcase_05 AC 70 ms
71,292 KB
testcase_06 AC 71 ms
71,308 KB
testcase_07 AC 71 ms
71,268 KB
testcase_08 AC 72 ms
71,380 KB
testcase_09 AC 71 ms
71,428 KB
testcase_10 AC 69 ms
71,084 KB
testcase_11 AC 71 ms
71,140 KB
testcase_12 AC 133 ms
81,748 KB
testcase_13 AC 201 ms
88,920 KB
testcase_14 AC 168 ms
85,452 KB
testcase_15 AC 140 ms
82,320 KB
testcase_16 AC 156 ms
84,348 KB
testcase_17 AC 80 ms
76,236 KB
testcase_18 AC 280 ms
96,524 KB
testcase_19 AC 284 ms
96,628 KB
testcase_20 AC 281 ms
96,424 KB
testcase_21 AC 183 ms
86,832 KB
testcase_22 AC 206 ms
89,440 KB
権限があれば一括ダウンロードができます

ソースコード

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