結果
問題 |
No.1528 Not 1
|
ユーザー |
|
提出日時 | 2021-06-05 03:41:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
OLE
|
実行時間 | - |
コード長 | 452 bytes |
コンパイル時間 | 1,446 ms |
コンパイル使用メモリ | 165,676 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-11-20 19:19:27 |
合計ジャッジ時間 | 37,500 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 8 OLE * 11 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int n;cin>>n; if(n&1){ if(n==1)cout<<1; else{if(n<=5)cout<<-1; else { cout<<3<<" "<<6<<" "<<2<<" "<<4<<" " ; for(int i=8;i<n;i+=2){ cout<<i<<" "; } } } } else{ for(int i=2;i<=n;i+2){ cout<<i<<" "; } } return 0; }