結果
問題 |
No.688 E869120 and Constructing Array 2
|
ユーザー |
|
提出日時 | 2022-03-12 16:08:30 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 344 bytes |
コンパイル時間 | 374 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 65,236 KB |
最終ジャッジ日時 | 2024-09-16 23:29:29 |
合計ジャッジ時間 | 1,857 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 8 WA * 1 RE * 1 |
ソースコード
K = int(input()) for i in range(2,10**5+1): if K < (i*(i-1) // 2): break if K % (i*(i-1) // 2) == 0: c = K // (i*(i-1) // 2) if bin(c).count('1') == 1: n1 = i n0 = 0 while c > 1: c //= 2 n0 += 1 ans = [1]*n1 + [0]*n0 print(len(ans)) print(*ans)