結果
問題 | No.2608 Divide into two |
ユーザー |
👑 |
提出日時 | 2024-01-19 21:23:27 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 55 ms / 1,000 ms |
コード長 | 307 bytes |
コンパイル時間 | 301 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 64,000 KB |
最終ジャッジ日時 | 2024-09-28 03:52:38 |
合計ジャッジ時間 | 863 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 |
ソースコード
def solve(n): m = n * (n + 1) // 2 if m % 2 == 1: print(-1) return tf = [0] * n x = m // 2 for i in range(n, 0, -1): if x >= i: tf[i - 1] = 1 x -= i print(*tf, sep="") for _ in range(int(input())): n = int(input()) solve(n)