#K86557. Fruit Inventory Checker

    ID: 36890 Type: Default 1000ms 256MiB

Fruit Inventory Checker

Fruit Inventory Checker

You are given a fruit inventory consisting of a number of items. Each item is represented by a fruit name and its quantity. Your task is to check whether the inventory has at least 50 units of a specific fruit. More formally, if the queried fruit has a quantity \(Q\) and \(Q \geq 50\), then output True; otherwise, output False.

The input begins with the number of inventory items, followed by each item’s details, and finally the fruit type to be checked. Make sure to use the standard input (stdin) and output (stdout) for reading and printing data.

inputFormat

The input is read from standard input (stdin) and is formatted as follows:

  1. An integer \(N\) representing the number of inventory items.
  2. Next \(N\) lines, each containing a fruit name (a string without spaces) and an integer quantity separated by a space.
  3. A final line containing a single string representing the fruit type to check.

For example:

3
apple 30
banana 55
orange 20
banana

outputFormat

The output is a single line printed to standard output (stdout):

  • True if the specified fruit exists in the inventory with a quantity of at least 50.
  • False otherwise.
## sample
3
apple 30
banana 55
orange 20
banana
True

</p>