728x90
10829번: 이진수 변환
첫째 줄에 자연수 N이 주어진다. (1 ≤ N ≤ 100,000,000,000,000)
www.acmicpc.net
풀이
n=int(input())
def DFS(x):
if x == 0:
return
else:
DFS(x//2)
print(x%2, end='')
DFS(n)
728x90
10829번: 이진수 변환
첫째 줄에 자연수 N이 주어진다. (1 ≤ N ≤ 100,000,000,000,000)
www.acmicpc.net
n=int(input())
def DFS(x):
if x == 0:
return
else:
DFS(x//2)
print(x%2, end='')
DFS(n)