たとえば
1だったら 1
2だったら繰り上がるので 10
3だったら 11
4だったら繰り上がるので100
こんな感じ。
(pythonにpow()メソッドがあるのは知らないという設定で)
def make_pow(x,y):
ret = 1
for i in range(y):
ret *= x
return ret
N = int(input())
binary = 0
i = 0
while N > 0:
digit = N % 2
binary += digit * make_pow(10,i)
# binary += digit * pow(10, i)
N //= 2
i += 1
print(binary)