Find the pattern
Statement
Goal
From n integers, find the multiplication pattern.Input
Line 1: An integer n for the number of integers to evaluate
Line 2: n integers to evaluate
Line 2: n integers to evaluate
Output
Line 1: Integer for the response
Constraints
0<=n<10
Example
Input
2 1 1
Output
4
Game modes
Reverse
Test cases
Test 1 Test
Input
2
1 1
Output
4
Validator 1 Validator
Input
2
2 2
Output
9
Test 2 Test
Input
3
2 2 2
Output
27
Validator 2 Validator
Input
3
3 3 3
Output
64
Test 3 Test
Input
3
2 1 1
Output
12
Validator 3 Validator
Input
4
2 2 1 1
Output
36
Test 4 Test
Input
5
5 2 2 1 1
Output
216
Validator 4 Validator
Input
6
3 3 2 1 1 1
Output
384
Test 5 Test
Input
3
5 4 3
Output
120
Validator 5 Validator
Input
3
8 9 12
Output
1170
Solution language
Solution
Stub generator input