#C2778. Find the Highest Expression
Find the Highest Expression
Find the Highest Expression
You are given a list of arithmetic expressions in string format. Each expression contains two numerical operands and a single operator (one of +, -, *, or /). Your task is to evaluate each expression and determine which one yields the highest result. In the event of a tie, output the expression that appears first in the list. If the list is empty, print No expressions provided
.
All expressions are guaranteed to be valid and follow the format of a binary operation. Note that the operands may be negative. For division, perform standard arithmetic division.
inputFormat
The input is provided via standard input (stdin). The first line of input contains an integer n representing the number of expressions. Each of the following n lines contains one arithmetic expression (without spaces).
outputFormat
Output a single line to standard output (stdout) containing the expression that results in the highest evaluated value. If there are no expressions (i.e. n = 0), output No expressions provided
.
3
3+4
10-5
6*2
6*2