fb pixel

Harsh conditions

A group of hikers takes on a journey to climb one of the highest mountains. To be able to make it to the top, each of them needs to have appropriate equipment.
Our task is to tell if a specific person would make it to the top.
notion image
A hiker makes it to the top if any of these conditions hold:
  • The person has hiking shoes and a coat
  • The person has hiking shoes and a tent
  • The person has hiking sticks, a coat, and sunglasses.
 
The input consists of 3 essential belongings the person has.
The program should output Yes if the person would make it to the top and No otherwise.
Input
Output
hiking shoes coat tent
Yes
sunglasses jacket coat
No
 
To check your solution you need to sign in
Sign in to continue