結果
問題 |
No.2608 Divide into two
|
ユーザー |
|
提出日時 | 2024-01-20 00:06:49 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 422 bytes |
コンパイル時間 | 2,067 ms |
コンパイル使用メモリ | 191,612 KB |
最終ジャッジ日時 | 2025-02-18 21:39:32 |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 |
ソースコード
#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"; } cout << endl; } else { cout << "-1" << endl; } } int main () { int T; cin >> T; while (T--) { solve(); } }