#K50342. Find the Highest Value Book in Stock

    ID: 28843 Type: Default 1000ms 256MiB

Find the Highest Value Book in Stock

Find the Highest Value Book in Stock

You are given a list of books, each with an ISBN, title, quantity, and price. The value of a book is defined as the product of its quantity and price. Your task is to determine which book has the highest total value in stock. If the list is empty, output an empty string. In case of a tie, select the book that appears first in the list. The value is computed by the formula:

(\text{value} = \text{quantity} \times \text{price})

Make sure to follow the input/output specifications carefully.

inputFormat

The input is read from standard input in the following format:

  • The first line contains an integer (n) representing the number of books.
  • For each book, four lines are provided in order:
    1. ISBN (string)
    2. Title (string)
    3. Quantity (integer)
    4. Price (float)

outputFormat

Output a single line containing the title of the book with the highest total value in stock. If the list is empty, output an empty string.## sample

1
123-456-789
Book_One
4
19.99
Book_One