結果

問題 No.1264 010
ユーザー disneyresidentsdisneyresidents
提出日時 2020-10-23 22:25:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 344 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 86,832 KB
実行使用メモリ 81,524 KB
最終ジャッジ日時 2023-09-28 16:24:11
合計ジャッジ時間 3,890 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
75,788 KB
testcase_01 AC 76 ms
71,440 KB
testcase_02 AC 82 ms
71,340 KB
testcase_03 TLE -
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 = 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(str(bin(ans))[2:])
            break
        ans += 1
0