結果

問題 No.1264 010
ユーザー disneyresidentsdisneyresidents
提出日時 2020-10-23 22:22:33
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 309 bytes
コンパイル時間 375 ms
コンパイル使用メモリ 87,088 KB
実行使用メモリ 85,608 KB
最終ジャッジ日時 2023-09-28 16:17:01
合計ジャッジ時間 5,277 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

def get_count(n):
    count = 0
    while "010" in n:
        n.replace("010", "101", 1)
        count += 1
    return count

N = int(input())
if N == 0:
    print(1)
else:
    ans = 1
    while True:
        count = get_count(str(bin(ans))[2:])
        if count == N:
            print(ans)
            break
0