Canadian Computing Competition: 2020 Stage 1, Junior #1
Barley the dog loves treats. At the end of the day, he is either happy or sad depending on the number and size of treats he receives throughout the day. The treats come in three sizes: small, medium, and large. His happiness score can be measured using the following formula:
where
If Barley's happiness score is
Input Specification
There are three lines of input. Each line contains a non-negative integer less than
Output Specification
If Barley's happiness score is happy
. Otherwise, output sad
.
Sample Input 1
3
1
0
Output for Sample Input 1
sad
Explanation of Output for Sample Input 1
Barley's happiness score is
Sample Input 2
3
2
1
Output for Sample Input 2
happy
Explanation of Output for Sample Input 2
Barley's happiness score is
Comments
first one i did :p
finished it in 5 mins. Not too bad!
This comment is hidden due to too much negative feedback. Show it anyway.
This comment is hidden due to too much negative feedback. Show it anyway.
Hint's for anyone coming across this comment:
Hope you find these hints helpful! Upvote if yes!
CAPITALIZATION COUNTS ON THIS QUESTION! Don't make the same mistake I did and capitalize the first letters of the output...
This comment is hidden due to too much negative feedback. Show it anyway.
The memory limit reflects the limit from the CCC, but the time limit is smaller because the DMOJ judge is faster.