Given an array of integers. Find out the minimum value of the following expression for all valid .
, where .
Video approach to solve this question: here
Input format
Output format
For each test case, print a single line containing one integer that represents the minimum value of the given expression
Constraints
Note: Sum of overall test cases does not exceed
For test case #1, we can select elements and , the value of the expression is , which is the minimum possible value. Another possible pair is 4 and 5.
For test case #2, we can select elements 4 and 7, the value of the expression is , which is the minimum possible value.