Чекинатор lab_3

parent b04efe5a
# Лабораторная работа №2. Построение бинарного дерева
# Лабораторная работа №3. Построение бинарного дерева
### 1.1 Постановка задачи
......
def factorial_dict(n: int, res=1) -> dict:
"""Рекурсивный факториал"""
print(res)
if n == 1:
return {str(n): res}
sub = factorial_dict(n - 1, res * n)
return {str(n): sub}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment