Cody

Problem 44276. Simple spirometer - find your lung capacity from the number and size of soap bubbles in one breath

Solution 1564190

Submitted on 19 Jun 2018 by David Verrelli
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
n=10; d=6; assert(spiro(n,d)<365*pi)

2   Pass
n=10; d=6; assert(spiro(n,d)>355*pi)

3   Pass
n=125; d=1; assert(spiro(n,d)<25*pi)

4   Pass
n=120; d=1; assert(spiro(n,d)>19*pi)

5   Pass
n=12; d=1; assert(spiro(n,d)<3*pi)

6   Pass
n=11; d=1; assert(spiro(n,d)>pi)