結果

問題 No.1281 Cigarette Distribution
ユーザー t98slidert98slider
提出日時 2023-07-25 03:27:25
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 3,692 ms
コンパイル使用メモリ 224,484 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-09 21:43:33
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 1 ms
6,944 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 13 ms
6,944 KB
testcase_13 AC 29 ms
6,940 KB
testcase_14 AC 21 ms
6,940 KB
testcase_15 AC 15 ms
6,940 KB
testcase_16 AC 19 ms
6,944 KB
testcase_17 AC 2 ms
6,944 KB
testcase_18 AC 48 ms
6,940 KB
testcase_19 AC 47 ms
6,940 KB
testcase_20 AC 47 ms
6,944 KB
testcase_21 AC 24 ms
6,944 KB
testcase_22 AC 29 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;

int main(){
    int n, m, c;
    cin >> n >> m;n++;
    for(int i = 1; i <= m; i++){
        atcoder::modint1000000007 v = (n + i) / i;
        cout << (v.pow(c) * (v - 1).pow(i - (c = n % i) - 1) * (v - 2)).val() << '\n';
    }
}
0