getting the actual sum as we shifted the numbers by 50 to avoid negative indexing in array
temp = i - 50 * n NEW_LINE max_value = max ( max_value , temp * ( sum - temp ) ) NEW_LINE min_value = min ( min_value , temp * ( sum - temp ) ) NEW_LINE print ( " Maximum Value : { } Minimum Value : { } " . format ( max_value , min_value ) ) NEW_LINE