Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import factorial
- a = int(input('Введите целое число a: '))
- b = int(input('Введите целое число b: '))
- n = int(input('Введите натуральное число n: '))
- for i in range(n+1):
- c = a**(n-i) * b**i * factorial(n) // (factorial(i) * factorial(n-i))
- print(f'C{i+1} = {c}')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement