#131. 手机接听条件判断
手机接听条件判断
Answer Phone Call
Background
Your phone is ringing, and you need to decide whether to answer it based on the current situation.
Problem Description
Your cell phone rings. Return true if you should answer it. Normally you answer, except in the morning you only answer if it is your mom calling. In all cases, if you are asleep, you do not answer.
Input Format
Input is given from standard input in the following format.
is_morning is_mom is_asleepThree boolean values, indicating whether it is morning, whether it is your mom calling, and whether you are asleep.truemeans true,falsemeans false.
Output Format
Output is printed to standard output in the following format.
resultA boolean value, indicating whether you should answer the phone.truemeans answer,falsemeans do not answer.
Sample
false false false
true
false false true
false
true false false
false
Sample Explanation
For Sample 1: It's not morning, it's not mom calling, and you are not asleep. According to the rules, you normally answer, so output true.
For Sample 2: It's not morning, it's not mom calling, but you are asleep. According to the rules, if you are asleep, you do not answer, so output false.
For Sample 3: It's morning, it's not mom calling, and you are not asleep. According to the rules, in the morning you only answer if it's your mom calling, so output false.
Constraints
Time limit: 1 second per test case. Memory limit: 1024 KiB per test case.