Answered step by step
Verified Expert Solution
Question
1 Approved Answer
only one shop in this island, this shop is open on all days of the week except for Sunday. Consider following constraints: 1. N -
only one shop in this island, this shop is open on all days of the week except for Sunday. Consider following constraints: 1. N - Maximum unit of food you can buy each day. 2. S - Number of days you are required to survive. 3. M - Unit of food required each day to survive. 2. S - Number of days you are required to survive. 3. M - Unit of food required each day to survive. Currently, it's Monday, and you need to survive for the next S days. If it is not possible to survive on the island, then the output should simply be "No". If it is possible to survive, then the output should be "Yes" followed by the minimum number of days on which you need to buy food to survive the next S days in next line. Coding Window def survival(S, N, M): \#write your code here s = int(input ()) n=int( input ()) m=int(input()) survival (s,n,m)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started