結果

問題 No.688 E869120 and Constructing Array 2
ユーザー dangodango
提出日時 2023-06-13 21:48:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 76 ms / 1,000 ms
コード長 197 bytes
コンパイル時間 923 ms
コンパイル使用メモリ 86,656 KB
実行使用メモリ 71,016 KB
最終ジャッジ日時 2023-09-04 09:06:14
合計ジャッジ時間 3,023 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
70,908 KB
testcase_01 AC 76 ms
70,804 KB
testcase_02 AC 75 ms
70,452 KB
testcase_03 AC 74 ms
70,960 KB
testcase_04 AC 74 ms
70,336 KB
testcase_05 AC 73 ms
70,896 KB
testcase_06 AC 74 ms
71,016 KB
testcase_07 AC 74 ms
70,916 KB
testcase_08 AC 75 ms
70,712 KB
testcase_09 AC 74 ms
70,848 KB
testcase_10 AC 75 ms
70,812 KB
testcase_11 AC 74 ms
70,916 KB
testcase_12 AC 75 ms
70,448 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)
0