Problem Statement
You are given an array of n integers. Create a new array where each element at index i equals the product of all numbers in the array except the number at index i.
Example
Input:
4 1 2 3 4
Output:
24 12 8 6
DEMO-C-32 โข Programming in C
You are given an array of n integers. Create a new array where each element at index i equals the product of all numbers in the array except the number at index i.
Input:
4 1 2 3 4
Output:
24 12 8 6
n, array
Product array
Submit runs every public testcase in this browser. Results and code never leave this device.
4 1 2 3 4
24 12 8 6
2 0 0
0 0
5 2 3 1 4 5
60 40 120 30 24
4 0 1 2 3
6 0 0 0
C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.
/workspace/question