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.
34T35.5 Take a hot bath.
35.5<T38 Rest if feeling unwell.
38<T39 Take some medicine.
39<T41 Take a cold bath and some medicine.
41<T46.1 Go to the hospital.
46.1<T50 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 ith line containing the corresponding result from the chart for the ith family member.

Constraints

1N100

0.0T100.0

Sample Input

Copy
8
6.9
34.1
38.9
37.0
40.0
42.0
69.0
46.9

Sample Output

Copy
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.