結果

問題 No.2608 Divide into two
ユーザー Carpenters-CatCarpenters-Cat
提出日時 2024-01-20 00:06:22
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 406 bytes
コンパイル時間 2,233 ms
コンパイル使用メモリ 201,260 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-20 00:06:26
合計ジャッジ時間 3,024 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
	int N;
	cin >> N;
	if ((N & 3) == 0) {
		for (int i = 0; i < N / 4; i ++) {
			cout << "1001";
		}
		cout << endl;
	} else if ((N & 3) == 3) {
		cout << "110";
		for (int i = 0; i < N / 4; i ++) {
			cout << "1001";
		}
	} else {
		cout << "-1" << endl;
	}
}
int main () {
	int T;
	cin >> T;
	while (T--) {
		solve();
	}
}
0