Development/Algorithm

[이코테 2021] 5장 그래프 탐색 알고리즘 [기초] 재귀함수

jstar0525 2022. 5. 10. 03:56
반응형
def factorial_recursive(n):
    if n <= 1:
        return 1
    else:
        return n * factorial_recursive(n-1)
        
print(factorial_recursive(5))
반응형