結果
| 問題 |
No.478 一般門松列列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-04 01:18:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 335 bytes |
| コンパイル時間 | 694 ms |
| コンパイル使用メモリ | 57,068 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-24 06:04:05 |
| 合計ジャッジ時間 | 6,081 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 34 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int num = 0;
for(int i=0;i<k;i++)
cout << num << endl;
for(int i=0;i<n-k;i++) {
cout << num << endl;
if(i%2==0)
num++;
else
num--;
num *= -1;
}
}