Masala #ZF7ZUYDCNP

Xotira 32 MB Vaqt 1000 ms Qiyinchiligi 10 %
14

  

Ozod hadni top

Masala quyidagicha:

\({(x^a + x ^ {-b})}^n\) ni ozod xadini topish.

Qo'shincha ma'lumotlar:

  • \(C(n,k) = n! / (k! * (n - k)!)\)
  • \((a + b) ^ n = C(n,0) * a^{n} * b^{0} + C(n,1) * a^{n - 1} * b^{1} + ... + C(n,n - 1) * a ^ {1} * b^{n - 1} + C(n,n) * a ^{0} * b^{n}\)

Kiruvchi ma'lumotlar:

Yagona qatorda a,b,n sonlari kiritiladi.

\(0 < a,b,n <= 32\)


Chiquvchi ma'lumotlar:

Ozodhadni chiqaring


Misollar
# input.txt output.txt
1
1 1 2
2
2
4 2 2
0
Izoh:

1- test uchun:\({(x^1 + x^{-1})}^2 = x ^{2} + 2 * x^{1} * x^{- 1} + x^{-2} = x^{2} + x^{-2} + 2\)  bunda ozod had 2 ga teng.

2-test uchun:

\((x^4 + x ^ {-2})^ 2 = (x ^ 4)^2 + 2*x^4 * x^{-2} + (x^{-2})^2 = x^8 + 2*x^2 + x ^ {-4}\)

bunda ozodahad No'l(0) ga teng

Yechimini yuborish
Bu amalni bajarish uchun tizimga kiring, agar profilingiz bo'lmasa istalgan payt ro'yxatdan o'tishingiz mumkin