a = int(input("ingresa el primer numero: \n"))
b = int(input("ingresa el segundo numero: \n"))
n = int(input("ingresa el exponente: \n"))
x = (a+b)**n
if n == 1:
print(a,"+",b)
print(x)
if n == 2:
print("%d^2 + 2*%d*%d + %d^2" % (a,a,b,b))
print (x)
if n == 3:
print("%d^3 + 3*%d^2*%d + 3*%d*%d^2 + %d^3" % (a,a,b,a,b,b))
print(x)