結果

問題 No.1528 Not 1
ユーザー AuroraAurora
提出日時 2021-06-06 15:33:42
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 1,539 ms
コンパイル使用メモリ 164,556 KB
実行使用メモリ 4,508 KB
最終ジャッジ日時 2023-08-14 20:49:50
合計ジャッジ時間 4,948 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 9 ms
4,376 KB
testcase_05 AC 3 ms
4,380 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 6 ms
4,376 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 1 ms
4,380 KB
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 11 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
  int N;
  cin >> N;
  if(N == 1) cout << 1 << endl;
  else if(N == 2) cout << 1 << endl;
  else if(N == 3) cout << -1 << endl;
  else if(N == 4) cout << "2 4" << endl;
  else if(N == 5) cout << -1 << endl;
  else{
    cout << "3 6";
    for(int i=2;i<=N;i+=2){
      if(i == 6) continue;
      cout << " " << i;
    }
    cout << endl;
  }
}
0