結果

問題 No.1281 Cigarette Distribution
ユーザー KudeKude
提出日時 2020-11-06 22:12:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 240 bytes
コンパイル時間 409 ms
コンパイル使用メモリ 87,152 KB
実行使用メモリ 77,472 KB
最終ジャッジ日時 2023-09-29 18:54:07
合計ジャッジ時間 4,326 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,292 KB
testcase_01 AC 64 ms
71,308 KB
testcase_02 AC 66 ms
71,392 KB
testcase_03 AC 67 ms
71,304 KB
testcase_04 AC 63 ms
71,440 KB
testcase_05 AC 63 ms
71,252 KB
testcase_06 WA -
testcase_07 AC 66 ms
71,320 KB
testcase_08 AC 66 ms
71,160 KB
testcase_09 AC 64 ms
71,260 KB
testcase_10 AC 65 ms
71,324 KB
testcase_11 AC 63 ms
71,348 KB
testcase_12 AC 126 ms
77,188 KB
testcase_13 AC 184 ms
77,220 KB
testcase_14 AC 148 ms
77,396 KB
testcase_15 AC 126 ms
77,188 KB
testcase_16 AC 143 ms
77,472 KB
testcase_17 AC 72 ms
75,348 KB
testcase_18 AC 253 ms
77,220 KB
testcase_19 AC 240 ms
77,228 KB
testcase_20 AC 250 ms
77,392 KB
testcase_21 AC 163 ms
77,360 KB
testcase_22 AC 184 ms
77,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 10**9+7
n, m = map(int, input().split())

for x in range(1, m + 1):
    if n <= x:
        print(0)
        continue
    q, r = divmod(n - (x - 1), x)
    ans = pow(q + 2, r, mod) * pow(q + 1, x - 1 - r, mod) * q % mod
    print(ans)
0