Question #261396

6. Integer Pairing

by CodeChum Admin

Now this one's a tad bit tricky, but you can definitely do it!


Instructions:

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Instructions

  1. Input five integers in one line, with each integer separated by a space.
  2. Add the 1st and 2nd integers together, store the sum inside a variable.
  3. Add the 3rd and 4th integers together, store the sum inside a variable.
  4. Multiply the two sums with each other and raise the product to the power of the 5th integer
  5. Print out the result.

Input

A line containing five integers separated by a space.


1·2·3·4·5

Output

A line containing an integer.


4084101

Expert's answer

num_list = list(map(int, input('Enter five integer: ').split()))
x = sum(num_list[:2])
y = sum(num_list[2:4])
z = x * y
print(z ** num_list[-1])
LATEST TUTORIALS
APPROVED BY CLIENTS