結果
問題 | No.2608 Divide into two |
ユーザー |
![]() |
提出日時 | 2024-01-19 21:24:20 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 57 ms / 1,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 244 ms |
コンパイル使用メモリ | 82,444 KB |
実行使用メモリ | 64,128 KB |
最終ジャッジ日時 | 2024-09-28 03:54:02 |
合計ジャッジ時間 | 839 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 |
ソースコード
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="")