結果

問題 No.1281 Cigarette Distribution
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-11-06 23:44:05
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 747 ms / 2,000 ms
コード長 123 bytes
コンパイル時間 230 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 8,368 KB
最終ジャッジ日時 2023-09-29 19:44:22
合計ジャッジ時間 6,319 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
7,884 KB
testcase_01 AC 15 ms
7,800 KB
testcase_02 AC 15 ms
7,952 KB
testcase_03 AC 14 ms
7,820 KB
testcase_04 AC 14 ms
7,924 KB
testcase_05 AC 14 ms
7,832 KB
testcase_06 AC 14 ms
7,792 KB
testcase_07 AC 15 ms
7,868 KB
testcase_08 AC 14 ms
7,772 KB
testcase_09 AC 14 ms
7,820 KB
testcase_10 AC 15 ms
7,784 KB
testcase_11 AC 15 ms
7,832 KB
testcase_12 AC 202 ms
7,760 KB
testcase_13 AC 465 ms
8,204 KB
testcase_14 AC 359 ms
7,760 KB
testcase_15 AC 232 ms
8,284 KB
testcase_16 AC 295 ms
8,244 KB
testcase_17 AC 17 ms
7,816 KB
testcase_18 AC 747 ms
8,280 KB
testcase_19 AC 732 ms
8,368 KB
testcase_20 AC 733 ms
8,296 KB
testcase_21 AC 413 ms
7,796 KB
testcase_22 AC 495 ms
8,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

P,p=10**9+7,pow
n,m=map(int,input().split())
for i in range(1,m+1):q,r=divmod(n+1,i);print(p(q+1,r,P)*p(q,i-r-1,P)*(q-1)%P)
0