[Solution] Rain in Chefland CodeChef Solution
Problem
In Chefland, precipitation is measured using a rain gauge in millimetre per hour.
Chef categorises rainfall as:
LIGHT
, if rainfall is less than millimetre per hour.MODERATE
, if rainfall is greater than equal to millimetre per hour and less than millimetre per hour.HEAVY
if rainfall is greater than equal to millimetre per hour.
Given that it rains at millimetre per hour on a day, find whether the rain is LIGHT
, MODERATE
, or HEAVY
.
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of a single integer — the rate of rainfall in millimetre per hour.
Output Format
For each test case, output on a new line, whether the rain is LIGHT
, MODERATE
, or HEAVY
.
You may print each character in lowercase or uppercase. For example, LIGHT
, light
, Light
, and liGHT
, are all identical.
Explanation:
Test case : The rate of precipitation is less than . Thus, the rain is LIGHT
.
Test case : The rate of precipitation is greater than equal to . Thus, the rain is HEAVY
.
Test case : The rate of precipitation is greater than equal to and less than . Thus, the rain is MODERATE
.
Test case : The rate of precipitation is greater than equal to . Thus, the rain is HEAVY
.
No comments:
Post a Comment