結果
問題 | No.1528 Not 1 |
ユーザー |
![]() |
提出日時 | 2021-06-04 20:28:34 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 431 bytes |
コンパイル時間 | 1,695 ms |
コンパイル使用メモリ | 167,220 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 09:11:47 |
合計ジャッジ時間 | 3,219 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 19 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){ios::sync_with_stdio(0);cin.tie(0); cout.tie(0);int N; cin >> N;if(N == 3 || N == 5){cout << -1 << "\n";}else if(N == 1){cout << 1 << "\n";}else if(N % 2 == 0){for(int i = 2; i <= N; i+= 2){cout << i << " ";}cout << "\n";}else{for(int i = 2; i <= N; i+= 2){if(i != 6) cout << i << " ";}cout << 6 << " " << 3 << "\n";}}