結果

問題 No.1528 Not 1
ユーザー mmn15277198mmn15277198
提出日時 2021-06-08 00:22:51
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 1,632 ms
コンパイル使用メモリ 167,600 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 06:41:20
合計ジャッジ時間 3,300 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 18 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
const int MX = 5500000;
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    for (int i = 2; i <= n; i += 2) {
      cout << i << " ";
    }
    cout << endl;
    return 0;
  }
  if (n < 6) {
    cout << -1 << endl;
    return 0;
  }
  cout << 3 << " " << 6 << " ";
  for (int i = 2; i <= n; i += 2) {
    if (i != 6) cout << i << " ";
  }
  cout << endl;
  return 0;
}
0