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.
hiking shoes coat tent
sunglasses jacket coat
Hint 1
Can you think of a smart way of finding out if a person has a specific item - hiking shoes, coat, sunglasses, or a tent? This will help you write less code and have a cleaner solution.
Hint 2
You can first go over all the 3 inputs and check if any of those are, for example, hiking shoes. If you find that any of the inputs are hiking shoes, you can set a boolean variable to True (which was set to False initially). You can perform the same procedure for sunglasses, tent, etc.


Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue