結果
問題 | No.2608 Divide into two |
ユーザー | rlangevin |
提出日時 | 2024-01-19 21:24:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 52 ms / 1,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 149 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 64,452 KB |
最終ジャッジ日時 | 2024-01-19 21:24:21 |
合計ジャッジ時間 | 806 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 36 ms
53,460 KB |
testcase_01 | AC | 49 ms
62,348 KB |
testcase_02 | AC | 52 ms
64,452 KB |
ソースコード
T = int(input()) for _ in range(T): N = int(input()) v = N * (N + 1) // 2 if v % 2: print(-1) continue v //= 2 ans = [0] * N for i in range(N, 0, -1): if v >= i: v -= i ans[i - 1] = 1 print(*ans, sep="")