結果
| 問題 |
No.2608 Divide into two
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-01-19 21:27:49 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 147 ms / 1,000 ms |
| コード長 | 665 bytes |
| コンパイル時間 | 403 ms |
| コンパイル使用メモリ | 82,240 KB |
| 実行使用メモリ | 89,600 KB |
| 最終ジャッジ日時 | 2024-09-28 03:57:53 |
| 合計ジャッジ時間 | 1,220 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 |
ソースコード
import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
t = int(input())
#alist = list(map(int,input().split()))
#alist = []
#s = input()
#n,m = map(int,input().split())
#for i in range(n):
# alist.append(list(map(int,input().split())))
for _ in range(t):
n = int(input())
x = n*(n+1)//2
if x % 2 == 1:
print(-1)
continue
ans = ['0' for i in range(n)]
temp = x // 2
for i in reversed(range(n)):
if temp >= i+1:
temp -= i+1
ans[i] = '1'
print(''.join(ans))