結果

問題 No.688 E869120 and Constructing Array 2
ユーザー syunsukesyunsuke
提出日時 2018-08-27 00:02:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 549 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 10,532 KB
実行使用メモリ 8,340 KB
最終ジャッジ日時 2023-09-13 19:28:05
合計ジャッジ時間 1,861 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,284 KB
testcase_01 AC 15 ms
8,148 KB
testcase_02 AC 16 ms
8,256 KB
testcase_03 AC 16 ms
8,216 KB
testcase_04 AC 15 ms
8,256 KB
testcase_05 AC 16 ms
8,340 KB
testcase_06 AC 16 ms
8,188 KB
testcase_07 AC 16 ms
8,192 KB
testcase_08 AC 16 ms
8,148 KB
testcase_09 WA -
testcase_10 AC 15 ms
8,220 KB
testcase_11 AC 16 ms
8,328 KB
testcase_12 AC 16 ms
8,252 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

K=int(input())
list1=[]
for i in range(1,30):
    if K%((i*(i+1))/2)==0:
        for j in range(30):
            if 2**j>1000000000:
                pass
            else:
                if K/((i*(i+1))/2)==2**j:
                    ans=[i+1,j]
                    print(sum(ans))
                    for k in range(i+1):
                        list1.append("1")
                    for l in range(j):
                        list1.append("0")
                    print(" ".join(list1))
                    exit()
                    
            
0