結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,224 KB
testcase_01 AC 15 ms
8,260 KB
testcase_02 AC 15 ms
8,188 KB
testcase_03 AC 18 ms
8,176 KB
testcase_04 AC 17 ms
8,268 KB
testcase_05 AC 16 ms
8,264 KB
testcase_06 AC 16 ms
8,220 KB
testcase_07 AC 15 ms
8,220 KB
testcase_08 AC 15 ms
8,184 KB
testcase_09 WA -
testcase_10 AC 15 ms
8,200 KB
testcase_11 AC 16 ms
8,144 KB
testcase_12 AC 16 ms
8,136 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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