結果
| 問題 |
No.796 well known
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-01 14:39:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 477 ms |
| コンパイル使用メモリ | 64,776 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-09-14 00:06:29 |
| 合計ジャッジ時間 | 1,576 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include<string>
using namespace std;
using ll = long long int;
int main(void){
int n;
cin >> n;
cout << 3 << " ";
for(int i = 1; i < n - 1; i ++){
cout << 1 << " ";
}
if (n % 3 == 0){
cout << 3 << endl;
}
else if (n % 3 == 1){
cout << 2 << endl;
}
else{
cout << 1 << endl;
}
return 0;
}