結果

問題 No.688 E869120 and Constructing Array 2
ユーザー 👑 H20H20
提出日時 2021-08-31 13:25:05
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 72 ms / 1,000 ms
コード長 178 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 71,708 KB
最終ジャッジ日時 2023-08-16 18:33:24
合計ジャッジ時間 2,450 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,336 KB
testcase_01 AC 72 ms
71,392 KB
testcase_02 AC 70 ms
71,144 KB
testcase_03 AC 69 ms
71,516 KB
testcase_04 AC 69 ms
71,708 KB
testcase_05 AC 72 ms
71,372 KB
testcase_06 AC 72 ms
71,284 KB
testcase_07 AC 72 ms
71,360 KB
testcase_08 AC 71 ms
71,504 KB
testcase_09 AC 71 ms
71,176 KB
testcase_10 AC 71 ms
71,528 KB
testcase_11 AC 70 ms
71,172 KB
testcase_12 AC 70 ms
71,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

K = int(input())
for i in range(1,31):
    for j in range(31-i):
        if K == i*(i-1)//2*pow(2,j):
            print(i+j) 
            print(*([1]*i+[0]*j))
            exit()
0