結果

問題 No.796 well known
ユーザー chacoder1
提出日時 2020-11-30 20:47:48
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 323 bytes
コンパイル時間 2,247 ms
コンパイル使用メモリ 191,500 KB
最終ジャッジ日時 2025-01-16 10:30:32
ジャッジサーバーID
(参考情報)
judge3 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

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


int main() {
  int N;
  cin>>N;
  if(N==2){
    cout<<1<<" "<<3<<endl;
    return 0;
  }
  if(N>=3){
    cout<<4-(N-2+3)%3<<" ";
    cout<<3<<" ";
    for(int i=0;i<N-2;i++){
      if(i !=0){
        cout<<" ";
      }
      cout<<1;
    }
  }
  cout<<endl;   
  return 0;
}
0