結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,128 KB
testcase_01 AC 16 ms
8,128 KB
testcase_02 AC 16 ms
8,320 KB
testcase_03 AC 16 ms
8,160 KB
testcase_04 AC 16 ms
8,108 KB
testcase_05 AC 15 ms
8,168 KB
testcase_06 AC 16 ms
8,256 KB
testcase_07 AC 16 ms
8,164 KB
testcase_08 AC 16 ms
8,260 KB
testcase_09 WA -
testcase_10 AC 15 ms
8,164 KB
testcase_11 AC 16 ms
8,260 KB
testcase_12 AC 15 ms
8,164 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

K=int(input())

if K==0:
    print(0)
    print(" ")
    exit()
else:
    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