結果

問題 No.1281 Cigarette Distribution
ユーザー ああああ
提出日時 2023-01-18 15:40:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 262 ms / 2,000 ms
コード長 174 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 87,028 KB
実行使用メモリ 77,432 KB
最終ジャッジ日時 2023-09-02 10:10:36
合計ジャッジ時間 6,181 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,188 KB
testcase_01 AC 73 ms
71,516 KB
testcase_02 AC 72 ms
71,188 KB
testcase_03 AC 72 ms
71,300 KB
testcase_04 AC 72 ms
71,412 KB
testcase_05 AC 72 ms
71,276 KB
testcase_06 AC 72 ms
71,316 KB
testcase_07 AC 72 ms
71,068 KB
testcase_08 AC 71 ms
71,320 KB
testcase_09 AC 70 ms
71,448 KB
testcase_10 AC 72 ms
71,336 KB
testcase_11 AC 71 ms
71,356 KB
testcase_12 AC 123 ms
76,452 KB
testcase_13 AC 189 ms
77,072 KB
testcase_14 AC 157 ms
77,320 KB
testcase_15 AC 133 ms
77,200 KB
testcase_16 AC 147 ms
77,140 KB
testcase_17 AC 80 ms
75,188 KB
testcase_18 AC 262 ms
77,292 KB
testcase_19 AC 261 ms
77,432 KB
testcase_20 AC 261 ms
77,204 KB
testcase_21 AC 170 ms
77,136 KB
testcase_22 AC 191 ms
77,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
mod=10**9+7
for i in range(1,M+1):
    q=(N+1)//i
    r=(N+1)%i

    ans=((pow(q+1,r,mod)*pow(q,i-r-1,mod))%mod)*(q-1)
    print(ans%mod)



    
0