結果

問題 No.1281 Cigarette Distribution
ユーザー t98slider
提出日時 2023-07-25 03:27:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 300 bytes
コンパイル時間 3,823 ms
コンパイル使用メモリ 228,412 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-01 22:13:18
合計ジャッジ時間 5,599 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

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