結果
問題 | No.1528 Not 1 |
ユーザー |
|
提出日時 | 2021-06-04 20:26:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 1,516 ms |
コンパイル使用メモリ | 167,852 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-19 08:58:29 |
合計ジャッジ時間 | 3,617 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 15 WA * 4 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll = long long int; int main(){ int n; cin>>n; if(n==1){ cout<<1; } else if(n%2==1&&n<6){ cout<<-1<<endl; } else{ for(int i=2;i<=n;i+=2){ if(n%2==1&&i==2){ cout<<3<<" "<<6<<" "; n-=2; } if(n%2==1&&i==6)i+=2; cout<<i<<" "; } } }