Cody

Problem 1915. GJam 2013 Veterans: Baby Height Prediction

Solution 2977825

Submitted on 22 Sep 2020 at 3:57 by Rafael S.T. Vieira
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
tic vstr='G 7''4" 9''11"'; vexp='8''1" to 8''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

2   Pass
vstr='G 8''1" 4''10"'; vexp='5''11" to 6''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

3   Pass
vstr='B 4''3" 2''9"'; vexp='3''5" to 4''0"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

4   Pass
vstr='G 1''10" 4''4"'; vexp='2''7" to 3''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

5   Pass
vstr='G 6''0" 9''7"'; vexp='7''3" to 7''11"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

6   Pass
vstr='G 3''5" 4''8"'; vexp='3''6" to 4''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

7   Pass
vstr='G 8''3" 7''9"'; vexp='7''6" to 8''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

8   Pass
vstr='B 8''7" 8''0"'; vexp='8''2" to 8''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

9   Pass
vstr='G 7''10" 1''3"'; vexp='4''0" to 4''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

10   Pass
vstr='G 2''9" 1''5"'; vexp='1''7" to 2''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

11   Pass
vstr='G 6''11" 8''9"'; vexp='7''4" to 7''11"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

12   Pass
vstr='B 4''7" 9''3"'; vexp='6''10" to 7''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

13   Pass
vstr='B 2''2" 7''11"'; vexp='4''11" to 5''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

14   Pass
vstr='G 3''0" 3''9"'; vexp='2''10" to 3''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

15   Pass
vstr='G 5''5" 3''3"'; vexp='3''10" to 4''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

16   Pass
vstr='G 2''6" 1''4"'; vexp='1''5" to 2''0"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

17   Pass
vstr='G 8''8" 8''7"'; vexp='8''1" to 8''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

18   Pass
vstr='G 9''11" 7''3"'; vexp='8''1" to 8''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

19   Pass
vstr='G 9''0" 1''2"'; vexp='4''7" to 5''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

20   Pass
vstr='G 7''0" 1''2"'; vexp='3''7" to 4''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

21   Pass
vstr='B 5''6" 5''7"'; vexp='5''5" to 6''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

22   Pass
vstr='G 4''8" 6''1"'; vexp='4''10" to 5''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

23   Pass
vstr='G 3''7" 2''3"'; vexp='2''5" to 3''0"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

24   Pass
vstr='G 7''7" 6''7"'; vexp='6''7" to 7''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

25   Pass
vstr='B 9''6" 6''5"'; vexp='7''10" to 8''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

26   Pass
vstr='G 1''3" 4''11"'; vexp='2''7" to 3''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

27   Pass
vstr='G 2''0" 5''6"'; vexp='3''3" to 3''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

28   Pass
vstr='G 1''7" 6''8"'; vexp='3''7" to 4''3"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

29   Pass
vstr='B 2''3" 5''11"'; vexp='4''0" to 4''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

30   Pass
vstr='B 2''3" 3''6"'; vexp='2''9" to 3''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

31   Pass
vstr='B 9''10" 1''9"'; vexp='5''8" to 6''4"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

32   Pass
vstr='G 4''6" 5''11"'; vexp='4''8" to 5''4"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

33   Pass
vstr='G 7''6" 1''2"'; vexp='3''10" to 4''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

34   Pass
vstr='B 3''7" 9''1"'; vexp='6''3" to 6''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

35   Pass
vstr='G 6''9" 9''11"'; vexp='7''10" to 8''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

36   Pass
vstr='B 1''10" 8''10"'; vexp='5''3" to 5''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

37   Pass
vstr='G 6''11" 7''4"'; vexp='6''7" to 7''3"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

38   Pass
vstr='B 1''9" 4''8"'; vexp='3''1" to 3''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

39   Pass
vstr='B 9''8" 6''3"'; vexp='7''10" to 8''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

40   Pass
vstr='B 5''6" 8''4"'; vexp='6''10" to 7''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

41   Pass
vstr='G 4''7" 9''6"'; vexp='6''6" to 7''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

42   Pass
vstr='G 2''7" 7''1"'; vexp='4''4" to 4''11"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

43   Pass
vstr='G 5''1" 7''10"'; vexp='5''11" to 6''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

44   Pass
vstr='G 1''5" 8''7"'; vexp='4''6" to 5''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

45   Pass
vstr='G 4''0" 1''0"'; vexp='2''0" to 2''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

46   Pass
vstr='B 4''4" 7''1"'; vexp='5''7" to 6''3"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

47   Pass
vstr='G 3''1" 8''1"'; vexp='5''1" to 5''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

48   Pass
vstr='G 5''5" 7''8"'; vexp='6''0" to 6''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

49   Pass
vstr='G 7''7" 8''2"'; vexp='7''4" to 8''0"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

50   Pass
vstr='G 3''6" 5''1"'; vexp='3''9" to 4''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

51   Pass
vstr='G 6''9" 6''9"'; vexp='6''3" to 6''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

52   Pass
vstr='G 6''4" 5''8"'; vexp='5''6" to 6''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

53   Pass
vstr='G 8''4" 2''10"'; vexp='5''1" to 5''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

54   Pass
vstr='B 6''7" 9''5"'; vexp='7''11" to 8''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

55   Pass
vstr='B 7''6" 5''7"'; vexp='6''5" to 7''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

56   Pass
vstr='B 6''11" 8''10"'; vexp='7''9" to 8''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

57   Pass
vstr='G 6''4" 3''2"'; vexp='4''3" to 4''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

58   Pass
vstr='G 9''3" 8''3"'; vexp='8''3" to 8''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

59   Pass
vstr='G 5''7" 1''4"'; vexp='2''11" to 3''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

60   Pass
vstr='B 7''2" 2''4"'; vexp='4''8" to 5''3"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

61   Pass
vstr='G 9''2" 5''8"'; vexp='6''11" to 7''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

62   Pass
vstr='B 6''4" 5''5"'; vexp='5''9" to 6''5"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

63   Pass
vstr='B 9''6" 7''7"'; vexp='8''5" to 9''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

64   Pass
vstr='G 4''6" 1''2"'; vexp='2''4" to 2''11"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

65   Pass
vstr='B 4''10" 3''7"'; vexp='4''1" to 4''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

66   Pass
vstr='G 8''10" 2''8"'; vexp='5''3" to 5''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

67   Pass
vstr='B 8''5" 4''3"'; vexp='6''3" to 6''10"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

68   Pass
vstr='B 7''1" 3''0"'; vexp='4''11" to 5''7"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

69   Pass
vstr='G 1''1" 9''3"'; vexp='4''8" to 5''3"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

70   Pass
vstr='B 6''0" 1''11"'; vexp='3''10" to 4''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

71   Pass
vstr='B 4''6" 9''9"'; vexp='7''0" to 7''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

72   Pass
vstr='G 7''6" 3''9"'; vexp='5''1" to 5''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

73   Pass
vstr='B 7''5" 2''7"'; vexp='4''11" to 5''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

74   Pass
vstr='B 6''11" 1''0"'; vexp='3''10" to 4''6"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

75   Pass
vstr='G 6''3" 3''9"'; vexp='4''6" to 5''1"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

76   Pass
vstr='G 8''0" 6''1"'; vexp='6''6" to 7''2"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

77   Pass
vstr='B 1''1" 3''11"'; vexp='2''5" to 3''0"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

78   Pass
vstr='G 4''8" 2''7"'; vexp='3''1" to 3''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

79   Pass
vstr='G 3''2" 3''3"'; vexp='2''8" to 3''4"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

80   Pass
vstr='G 2''5" 6''8"'; vexp='4''0" to 4''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

81   Pass
vstr='B 2''8" 3''8"'; vexp='3''1" to 3''8"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp))

82   Pass
vstr='G 6''6" 2''9"'; vexp='4''1" to 4''9"'; vout=BabyH_V(vstr); assert(strcmp(vout,vexp)) toc

Elapsed time is 1.471033 seconds.

Suggested Problems

More from this Author241

Community Treasure Hunt

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

Start Hunting!