結果

問題 No.2608 Divide into two
ユーザー hir355hir355
提出日時 2024-01-19 21:38:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 357 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 61,956 KB
最終ジャッジ日時 2024-01-19 21:38:38
合計ジャッジ時間 908 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

t = int(input())
for _ in range(t):
    n = int(input())
    if n % 4 == 0:
        print('0110' * (n // 4))
    elif n % 4 == 3:
        ans = ['0', '1', '1', '0'] * ((n + 1) // 4)
        ans.pop()
        ans[-3] = '1'
        ans[-2] = '0'
        ans[-1] = '0'
        ans[(n + 1) // 2 - 1] = '1'
        print(*ans, sep='')
    else:
        print(-1)
0