반응형

 

def hanoi(N,start,end):
    if N == 1:
        return 1
    
    return 2* hanoi(N-1) + 1
   
N = int(input())
print(hanoi(N))
반응형

+ Recent posts