Cho một mảng A[] các số nguyên tìm tổng tích của tất cả các cặp phần tử mảng i. e. , chúng ta cần tìm sản phẩm sau khi thực thi mã giả sau
product = 0 for i = 1:n for j = i+1:n product = product + A[i]*A[j]
ví dụ.
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19
Thực hành đề xuấtTổng sản phẩm của tất cả các cặpDùng thử
Giải pháp ngây thơ
Đối với mỗi chỉ mục i, chúng ta lặp qua j=i+1 đến j=n và thêm A[i]*A[j] mỗi lần. Dưới đây là thực hiện cho cùng.
C++
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1985
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1986
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 190
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 191
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 196
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1922
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1942
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1922
_______120____424____425
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1931
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Java
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1933
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1934
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1936
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1938
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 196
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19863
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19870
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19872
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19877
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19879
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1909
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1912
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1914
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1915
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1918
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1923
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1930
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1931
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1933
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1934
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Python3
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1941
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1942
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1945
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1952
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1953
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1954
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1955
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1958
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1953
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1954
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1961
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1964
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1970
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1971
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1972
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1942
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1977
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1978
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1979____148
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1982
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1983
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1985
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1923
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1993
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1995
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1997
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1998
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1942
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19201
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19206
C#
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19207
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19209
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19211
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19219
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1922
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19235
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19237
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1912
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1914
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19246
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19250
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19253
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19255
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19256
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19258
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259____135
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19262
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19265
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
PHP
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19267
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19268
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19269
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19271
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194____1273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19276
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19279
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19287
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19291
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19295
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19298
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19295
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19287
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19295
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19291
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19279
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19279
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19413
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19295
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19417
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19279____9865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19428
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19429
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19432
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19436
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925____120
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19439
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19439
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19442
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19447
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19448
Javascript
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19449
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19450
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19271
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19454
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19457
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19460
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19463
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1947
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19473
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19475
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19478
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19483
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19485
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19487
đầu ra.
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Độ phức tạp về thời gian. O[n2]
Độ phức tạp của không gian. O[1]
Giải pháp O[n] hiệu quả
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
C++
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19488
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19489
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1986
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 190
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 191
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 196
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19203
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19206
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19213
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19215
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19220
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19222
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19225
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19232
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19234
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19236
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19239
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1922
_______120____424____1257
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1931
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Java
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19265
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19489
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19211
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 196
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19283____9864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19870
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19872
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19213
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19215
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19220
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19222
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19206
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19870
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19872
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19234
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19236
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19224____4225
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1912
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1914
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19232
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1918
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1923
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____4247
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19257
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19483
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19256
Python3
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19257
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19258
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19261
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
_______120____4264
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1952
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1953
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1954
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19276
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19278
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1970
_______120____4286
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____4288
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19290
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1971
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19266
_______120____4296
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19298
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1952
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1953
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1954
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19276
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19278
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19298
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1970
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1971
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1970
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____5319
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____5321
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19324
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19325
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943____5327____5328
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19225
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1977
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1978
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1979____148
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19335
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1983
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1985
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1923
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1993
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1995
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1997
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1998
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19201
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19355
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19357
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19358
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19361
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19363
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19364
C#
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19365
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19366
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19209
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19211
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19219
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19206
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19213
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19215
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19220
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19222
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19225
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19234
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19236
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198518
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943____98520
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1912
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1914
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19246
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19250
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19253
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19255
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19256
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19258
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198541____98542
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198545
PHP
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19267
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198547
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198548
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19271
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198551
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19276
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____98560
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19287
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19291
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198560
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198560
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19417
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19215
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198587
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198560
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1971
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198560
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19222
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198596
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19287
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19291
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198596
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198611
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19413
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19284
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19417
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19234
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19236
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198587
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19325
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943____98596____98631
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948____2428
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19429
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19432
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19436
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198645
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198646____427
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19436
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198650____1273
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19275
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198654
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19265
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198656
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19448
Javascript
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19449
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____98660
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____5366
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19271
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19454
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19280
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98674
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198677
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19213
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19215
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98685
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19222
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98689
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198677
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1943
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19217
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19234
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19236
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198701
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19473
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19475
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19478
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19256
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19258
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19259
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198541____98542
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920____98720
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19487
đầu ra.
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
Độ phức tạp về thời gian. O[n]
Độ phức tạp của không gian. Ô[1]
Một giải pháp hiệu quả khác
Đối với số lượng lớn khi chúng ta cũng nên làm việc với mô đun 10^9+7. Cách tiếp cận trên có thể không hoạt động. Vì vậy, Trực giác cho cách tiếp cận này là cho mỗi số nếu chúng ta nhân nó với tổng tiền tố thì tất cả các cặp trước phần tử được bao phủ và sau đó phần tử được thêm vào tổng sẽ đảm bảo cho chúng ta phép nhân các cặp sau phần tử
ví dụ
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 192
C++
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19488
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19489
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1986
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1987
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 190
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 191
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 196
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198734
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198739
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198743
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198747
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198752
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98754
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98756
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98758
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928____98760
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198765
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1949
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198773
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929____98778
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1929
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1922
_______120____424____98783
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19439
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1931
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198790
Java
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198791
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198792
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1935
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1936
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1937
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1909
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19494
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 194
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19219
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198734
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19011______9864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19016____9864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 198737
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19021____1022
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19865
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19870
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19030
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____98754
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____98756
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____98758
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____98760
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1946
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19045
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1912
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1913
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1914
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19232
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 199
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19057
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19878
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1921______120
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1923
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 193
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1927
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1933
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____98783
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19031____2483
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19451
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19076
Python3
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19077
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19078
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1944
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19080
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19082
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19086
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19864
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19090
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19022
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1920
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1924
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1952
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1953
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1954
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19098
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1928
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19082
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1962
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1948
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1925
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19086
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 1971
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19106
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19107
Input : A[] = {1, 3, 4} Output : 19 Possible Pairs : [1,3], [1,4], [3,4] Sum of Product : 1*3 + 1*4 + 3*4 = 19090