結果

問題 No.1658 Product / Sum
ユーザー nawawan
提出日時 2021-08-27 21:39:01
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 2,332 ms
コンパイル使用メモリ 193,372 KB
最終ジャッジ日時 2025-01-24 02:44:17
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    long long N, K;
    cin >> N >> K;
    vector<int> ans(N);
    ans[0] = K + 1;
    for(int i = 1; i < N - 1; i++) ans[i] = 1;
    ans[N - 1] = K * (K + N - 1);
    for(int i = 0; i < N; i++){
        if(i != N - 1) cout << ans[i] << ' ';
        else cout << ans[i] << endl;
    }
}
0