You are given a list of integers. A list is shown by comma-separated numbers between two brackets. For example, [7,3,6] is a list. The number in location one is 7, the number in location two is 3, and the number in location three is 6. You should answer with a list such that every element at each location is equal to the product of elements at every other location in the input array. For example, if a list has four numbers, the answer you give should be created like this: First element of your list = product of second, third, and fourth elements in the given list. Second element of your list = product of First, third and fourth elements in the given list, etc.
One example is below.
Q: [1,2,3,4,5]
A: [120, 60, 40, 30, 24]
Rationale: The given list contains five elements, so the answer should contain five elements too. The first element of the answer equals the product of first, second, third, fourth and fifth elements from the given list. That is: 2x3x4x5 = 120. The second element is the product of the first, third, fourth and fifth elements from the given list. That is: 1x3x4x5=60. The other elements are also calculated like this.
Q: [9, 11, 6, 8, 10, 13, 14, 2]
A:
[1921920, 1572480, 2882880, 2162160, 1729728, 1330560, 1235520, 8648640]