#K40452. Categorize Books by Page Count

    ID: 26645 Type: Default 1000ms 256MiB

Categorize Books by Page Count

Categorize Books by Page Count

You are given the number of books and the number of pages in each book. Your task is to categorize each book into one of the following categories based on its page count:

  • Short Story: if the number of pages is strictly less than 100.
  • Novella: if the number of pages is between 100 and 300 (inclusive).
  • Novel: if the number of pages is greater than 300.

Mathematically, if we denote the page count by \(P\), the conditions are as follows:

  • \(P < 100\) → Short Story
  • \(100 \leq P \leq 300\) → Novella
  • \(P > 300\) → Novel

You need to read the input from stdin and output the category of each book to stdout, each on a new line.

inputFormat

The input is read from standard input and is structured as follows:

  1. An integer \(T\) representing the number of books.
  2. A line containing \(T\) integers where each integer represents the number of pages in a book.

Example:

5
85 120 250 305 99

outputFormat

For each book, print its category on a separate line. The possible outputs are:

  • Short Story
  • Novella
  • Novel

Example Output:

Short Story
Novella
Novella
Novel
Short Story
## sample
1
85
Short Story

</p>