結果

問題 No.1658 Product / Sum
ユーザー 箱星
提出日時 2021-07-20 01:11:31
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 292 bytes
コンパイル時間 634 ms
コンパイル使用メモリ 72,136 KB
最終ジャッジ日時 2025-01-23 03:20:48
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> a(n, 1);
    a[0] = 2 * k;
    a[1] = 2 * k + n - 2;
    for (int i = 0; i < n; i++) {
        cout << a[i];
        if (i < n - 1) cout << " ";
    }
    cout << endl;
}
0