結果

問題 No.478 一般門松列列
ユーザー hkr
提出日時 2017-02-04 01:33:50
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 30 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 56,688 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 06:06:50
合計ジャッジ時間 2,329 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
    int n, k;
    cin >> n >> k;

    int num = 30000;
    for(int i=0;i<k;i++)
        cout << num << endl;
    for(int i=0;i<n-k;i++) {
        if(i%2==0) 
            cout << num+i << endl;
        else 
            cout << num-i << endl;
    }
}
0