<garvit244>1017_1.py
def baseNeg2( N):
    if N == 0:
        digits = ['0']
    else:
        digits = []
        while N != 0:
            N, remainder = divmod(N, -2)
            if remainder < 0:
                N, remainder = N+1, remainder + 2
            digits.append(str(remainder))
    return ''.join(digits[::-1])
def sample_funcname ( var_0 ) :
    if var_0 == 0 :
        var_3 = [ '0' ]
    else :
        var_3 = [ ]
        while var_0 != 0 :
            var_0 , var_6 = divmod ( var_0 , - 2 )
            if var_6 < 0 :
                var_0 , var_6 = var_0 + 1 , var_6 + 2
            var_3.append ( str ( var_6 ) )
    return ''.join ( var_3 [ : : - 1 ] )
