Cody

# Problem 44939. What time can I drive after drinking?

Solution 1892804

Submitted on 6 Aug 2019 by Steven Beumer
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
T = 19; N = 1; D_correct = 0; H_correct = 20; [D,H]=driveTime(T,N) assert(isequal(D,D_correct)) assert(isequal(H,H_correct))

H = 20 D = 0 D = 0 H = 20

2   Pass
T = 17; N = 5; D_correct = 1; H_correct = 6; [D,H]=driveTime(T,N) assert(isequal(D,D_correct)) assert(isequal(H,H_correct))

H = 6 D = 1 D = 1 H = 6

3   Pass
T = 19; N = 10; D_correct = 1; H_correct = 23; [D,H]=driveTime(T,N) assert(isequal(D,D_correct)) assert(isequal(H,H_correct))

H = 23 D = 1 D = 1 H = 23

4   Pass
T = 23; N = 20; D_correct = 3; H_correct = 9; [D,H]=driveTime(T,N) assert(isequal(D,D_correct)) assert(isequal(H,H_correct))

H = 9 D = 3 D = 3 H = 9

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!