This commit is contained in:
2026-04-18 14:42:00 +05:00
commit ef77f101fa
96 changed files with 3134 additions and 0 deletions

29
labPython/lab2/TheTwo16.py Executable file
View File

@@ -0,0 +1,29 @@
# print("Введите число N")
# N = int(input())
#
# def fac(x: int): # факториал числа
# return _fac (x*2, x)
#
# def _fac(x: int, y: int):
# if x > y:
# return (y * _fac(x, y+1))
# else:
# return y
#
# x = 0
# if N <= 12:
# for i in range(1, N+1):
# step = i**i
# factorial = fac(i)
# x += step / factorial
# print(x)
N = int(input())
s = 0
for i in range(1, N + 1):
p = 1
for j in range(i, 2 * i + 1):
p *= j
s += i**2 / p
print(s)