<jupyter_start><jupyter_text>2020년 5월 1일 금요일 BaekJoon - 2089번 : -2진수 문제 : https://www.acmicpc.net/problem/2089 블로그 : https://somjang.tistory.com/entry/BaekJoon-2089%EB%B2%88-2%EC%A7%84%EC%88%98-Python  첫번째 시도<jupyter_code>inputNum = int(input())
base = 1
minusBinary = []

if inputNum == 0:
    print(0)
else:
    while inputNum:
        if inputNum % 2:
            minusBinary.append(1)
            inputNum = inputNum - base
        else:
            minusBinary.append(0)
        base = base * (-1)
        inputNum //= 2

for i in range(len(minusBinary)-1, -1, -1):
    print(minusBinary[i], end='')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14826498422712933, 'fraction_numerical': 0.06466876971608833, 'mean_word_length': 2.735294117647059, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '552499', 'license': 'MIT', 'n_tokens_mistral': 285, 'n_tokens_neox': 279, 'n_words': 46, 'path': 'DAY 001 ~ 100/DAY085_[BaekJoon] -2진수 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '634'}