結果

問題 No.566 だいたい完全二分木
ユーザー convexineqconvexineq
提出日時 2021-03-11 17:51:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 65 ms / 2,000 ms
コード長 172 bytes
コンパイル時間 286 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 76,236 KB
最終ジャッジ日時 2024-04-21 07:02:59
合計ジャッジ時間 1,577 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,204 KB
testcase_01 AC 38 ms
52,672 KB
testcase_02 AC 39 ms
52,660 KB
testcase_03 AC 39 ms
52,532 KB
testcase_04 AC 39 ms
52,468 KB
testcase_05 AC 40 ms
53,152 KB
testcase_06 AC 40 ms
52,956 KB
testcase_07 AC 46 ms
55,964 KB
testcase_08 AC 47 ms
63,260 KB
testcase_09 AC 57 ms
68,904 KB
testcase_10 AC 65 ms
76,236 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(x):
    c = bin(x)[2:]
    c = "0"*(k-len(c)) + c
    return int(c[::-1],2)
    
k = int(input())
ans = [2**k-1] + [f(i) for i in range(1,2**k)]
ans.pop()
print(*ans)
0