-
Notifications
You must be signed in to change notification settings - Fork 2
/
task.html
12 lines (12 loc) · 2.1 KB
/
task.html
1
2
3
4
5
6
7
8
9
10
11
12
<b>Healthy sleep</b> <a class=right href="https://hyperskill.org/learn/step/2169">Open on JetBrains Academy</a>
<br><br>
<html>
<head></head>
<body>
<p>Ann watched a TV program about health and learned that it is recommended to sleep at least <strong>A</strong> hours per day, but oversleeping is also not healthy, and you should not sleep more than <strong>B</strong> hours. Now Ann sleeps <strong>H</strong> hours per day. If Ann's sleep schedule complies with the requirements of that TV program – print "Normal". If Ann sleeps less than <strong>A</strong> hours, output “Deficiency”, and if she sleeps more than <strong>B</strong> hours, output “Excess”.</p>
<p>Input to this program are the three strings with variables in the following order: <span class="math-tex">\( A \)</span>, <span class="math-tex">\( B \)</span>, <span class="math-tex">\( H \)</span>. <span class="math-tex">\( A \)</span> is always less than or equal to <span class="math-tex">\( B \)</span>.</p>
<p>Please note the letters' cases: the output should exactly correspond to what required in the problem, i.e. if the program must output "Excess", output such as "excess", "EXCESS", or "ExCeSs" will not be graded as correct.</p>
<p>You should <strong>carefully</strong> think about all the conditions, which you need to use. Special attention should be paid to the strictness of the used conditional operators: distinguish between <span class="math-tex">\( \lt \)</span> and <span class="math-tex">\( \le \)</span>; <span class="math-tex">\( \gt \)</span> and <span class="math-tex">\( \ge \)</span>. In order to understand which ones to use, please <strong>carefully</strong> read the problem statement.</p>
</body>
</html><br><b>Sample Input:</b><br>6<br>10<br>8<br><b>Sample Output:</b><br>Normal<br><br><b>Sample Input:</b><br>7<br>9<br>10<br><b>Sample Output:</b><br>Excess<br><br><b>Sample Input:</b><br>7<br>9<br>2<br><b>Sample Output:</b><br>Deficiency<br><br><br><font color="gray">Memory limit: 256 MB</font><br><font color="gray">Time limit: 5 seconds</font><br><br>
<a href="https://hyperskill.org/learn/step/3503">Show topic summary</a>