#K51942. Marathon Runner Categorization

    ID: 29199 Type: Default 1000ms 256MiB

Marathon Runner Categorization

Marathon Runner Categorization

You are given the task of categorizing marathon runners based on the type of marathon and their finishing time. The input consists of three integers D, H, and M, where:

  • D indicates the marathon type (1 for full marathon, 0 for half marathon).
  • H is the finishing time in hours.
  • M is the finishing time in minutes.

The categorization rules are as follows:

  • For a full marathon ($D=1$): If $H < 4$, the runner is classified as "Category A"; otherwise, "Category B".
  • For a half marathon ($D=0$): If $H < 2$ or if $H = 2$ and $M = 0$, the runner is classified as "Category B"; otherwise, "Category C".

Your program should read the input from standard input (stdin) and output the correct category to standard output (stdout).

inputFormat

The input consists of a single line containing three space-separated integers:

  1. D (an integer, where 1 represents a full marathon and 0 a half marathon).
  2. H (an integer representing the number of hours).
  3. M (an integer representing the number of minutes).

outputFormat

Output a single line containing the category of the runner. The possible outputs are:

  • "Category A"
  • "Category B"
  • "Category C"
## sample
1 3 45
Category A