Sum stores the sum of all the sides and maxS stores the length of the largest side
sum = 0 NEW_LINE maxS = 0 NEW_LINE for i in range ( n ) : NEW_LINE INDENT sum += a [ i ] NEW_LINE maxS = max ( a [ i ] , maxS ) NEW_LINE DEDENT