QCC P0 - Thermometer

View as PDF

Submit solution


Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

A new virus named COVID-19 is going around. To make sure that everyone in your family is healthy, you've decided to create a virtual thermometer. Having done some research, you've decided that given a temperature T, you will output a single sentence according to the following chart for each of your N family members:

Temperature Output
T < 34 Too cold, please try again.
34 \le T \le 35.5 Take a hot bath.
35.5 < T \le 38 Rest if feeling unwell.
38 < T \le 39 Take some medicine.
39 < T \le 41 Take a cold bath and some medicine.
41 < T \le 46.1 Go to the hospital.
46.1 < T \le 50 Congrats, you have a new world record!
50 < T Too hot, please try again.

Input Specification

The first line will contain a positive integer N, the number of family members.

The next N lines will each contain a number T, denoting the temperature measured for that family member rounded to exactly one decimal place.

Output Specification

Output N lines, with the i^\text{th} line containing the corresponding result from the chart for the i^\text{th} family member.

Constraints

1 \le N \le 100

0.0 \le T \le 100.0

Sample Input

8
6.9
34.1
38.9
37.0
40.0
42.0
69.0
46.9

Sample Output

Too cold, please try again.
Take a hot bath.
Take some medicine.
Rest if feeling unwell.
Take a cold bath and some medicine.
Go to the hospital.
Too hot, please try again.
Congrats, you have a new world record!

Comments

There are no comments at the moment.