At T o'clock, after a hard day of Matlab, I immediately start drinking and treat myself to N pints of tasty beer. Each beer I drink has 3 standard units (strong beer - ~5.2%) and my body processes 1 unit of alcohol each hour (the average). Assume all beer is consumed instantly.
In England the legal limit for driving is approximately 2 units of alcohol in your blood, assuming this at what time can I legally drive again?
The input N is number of beers drank and T the time I start drinking (as a 24 hour integer). The output H is the hour I may drive again (24 hour integer) and the output Y is how many days (where 0 is the same day, 1 is the following day etc).
E.g. If I drink 1 beer (N=1) at 7 pm (T=19), 1 of the units will be processed in 1 hour and I can 'safely' drive with 2 units in my blood. The output is D=0, H=20.
https://www.nhs.uk/common-health-questions/lifestyle/how-long-does-alcohol-stay-in-your-blood/
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
287 Solvers
-
Getting the absolute index from a matrix
259 Solvers
-
I've got the power! (Inspired by Project Euler problem 29)
148 Solvers
-
425 Solvers
-
There are 10 types of people in the world
1396 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!