結果
問題 |
No.796 well known
|
ユーザー |
![]() |
提出日時 | 2019-03-16 00:40:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 729 bytes |
コンパイル時間 | 1,672 ms |
コンパイル使用メモリ | 165,780 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-01 22:11:16 |
合計ジャッジ時間 | 4,158 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 2 WA * 13 |
ソースコード
#include <bits/stdc++.h> #define int long long #define ll long long #define rep(i,n) for(int i=0;i<n;i++) #define INF (((ll)1<<31)-1) #define eps LDBL_EPSILON #define moder (1000000007) #define pie 3.141592653589793238462643383279 #define P std::pair<int,int> #define prique priority_queue #define ggr getchar();getchar();return 0; using namespace std; signed main(){ int n; cin>>n; if(n==2)cout<<1<<" "<<3<<endl; else if(n==3)cout<<1<<" "<<3<<" "<<6<<endl; else if(n%3==0){ rep(i,n-1)cout<<i+1<<" "; cout<<n+1<<endl; } else if(n%3==1){ rep(i,n-1)cout<<i+1<<" "; cout<<n<<endl; } else{ rep(i,n-1)cout<<i+1<<" "; cout<<n+1<<endl; } ggr; }