Cody

# Problem 44074. GJam 2017 Kickstart: Parentheses (Small)

Solution 1133520

Submitted on 4 Mar 2017
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   Fail
v=parenc(19,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint1 (line 1) v=parenc(19,1);

2   Fail
v=parenc(14,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

3   Fail
v=parenc(4,15); assert(~isempty(v)) assert(v==10)

Assertion failed.

4   Fail
v=parenc(8,6); assert(~isempty(v)) assert(v==21)

Assertion failed.

5   Fail
v=parenc(14,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint5 (line 1) v=parenc(14,1);

6   Fail
v=parenc(10,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint6 (line 1) v=parenc(10,2);

7   Fail
v=parenc(10,10); assert(~isempty(v)) assert(v==55)

Assertion failed.

8   Fail
v=parenc(3,7); assert(~isempty(v)) assert(v==6)

Assertion failed.

9   Fail
v=parenc(3,13); assert(~isempty(v)) assert(v==6)

Assertion failed.

10   Fail
v=parenc(4,12); assert(~isempty(v)) assert(v==10)

Assertion failed.

11   Fail
v=parenc(2,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint11 (line 1) v=parenc(2,2);

12   Fail
v=parenc(6,11); assert(~isempty(v)) assert(v==21)

Assertion failed.

13   Fail
v=parenc(4,12); assert(~isempty(v)) assert(v==10)

Assertion failed.

14   Fail
v=parenc(15,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

15   Fail
v=parenc(14,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

16   Fail
v=parenc(20,0); assert(~isempty(v)) assert(v==0)

Assertion failed.

17   Fail
v=parenc(12,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

18   Fail
v=parenc(0,10); assert(~isempty(v)) assert(v==0)

Assertion failed.

19   Fail
v=parenc(18,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint19 (line 1) v=parenc(18,2);

20   Fail
v=parenc(16,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

21   Fail
v=parenc(3,12); assert(~isempty(v)) assert(v==6)

Assertion failed.

22   Fail
v=parenc(8,12); assert(~isempty(v)) assert(v==36)

Assertion failed.

23   Fail
v=parenc(8,6); assert(~isempty(v)) assert(v==21)

Assertion failed.

24   Fail
v=parenc(1,8); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint24 (line 1) v=parenc(1,8);

25   Fail
v=parenc(7,13); assert(~isempty(v)) assert(v==28)

Assertion failed.

26   Fail
v=parenc(7,6); assert(~isempty(v)) assert(v==21)

Assertion failed.

27   Fail
v=parenc(11,8); assert(~isempty(v)) assert(v==36)

Assertion failed.

28   Fail
v=parenc(17,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint28 (line 1) v=parenc(17,1);

29   Fail
v=parenc(4,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint29 (line 1) v=parenc(4,2);

30   Fail
v=parenc(1,6); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint30 (line 1) v=parenc(1,6);

31   Fail
v=parenc(5,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

32   Fail
v=parenc(1,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint32 (line 1) v=parenc(1,1);

33   Fail
v=parenc(7,13); assert(~isempty(v)) assert(v==28)

Assertion failed.

34   Fail
v=parenc(6,12); assert(~isempty(v)) assert(v==21)

Assertion failed.

35   Fail
v=parenc(15,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint35 (line 1) v=parenc(15,2);

36   Fail
v=parenc(14,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint36 (line 1) v=parenc(14,2);

37   Fail
v=parenc(12,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint37 (line 1) v=parenc(12,1);

38   Fail
v=parenc(4,15); assert(~isempty(v)) assert(v==10)

Assertion failed.

39   Fail
v=parenc(12,7); assert(~isempty(v)) assert(v==28)

Assertion failed.

40   Fail
v=parenc(5,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint40 (line 1) v=parenc(5,1);

41   Fail
v=parenc(19,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint41 (line 1) v=parenc(19,1);

42   Fail
v=parenc(6,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

43   Fail
v=parenc(11,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

44   Fail
v=parenc(8,12); assert(~isempty(v)) assert(v==36)

Assertion failed.

45   Fail
v=parenc(18,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint45 (line 1) v=parenc(18,2);

46   Fail
v=parenc(18,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint46 (line 1) v=parenc(18,1);

47   Fail
v=parenc(13,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

48   Fail
v=parenc(3,6); assert(~isempty(v)) assert(v==6)

Assertion failed.

49   Fail
v=parenc(6,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint49 (line 1) v=parenc(6,1);

50   Fail
v=parenc(3,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

51   Fail
v=parenc(19,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint51 (line 1) v=parenc(19,1);

52   Fail
v=parenc(9,11); assert(~isempty(v)) assert(v==45)

Assertion failed.

53   Fail
v=parenc(10,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint53 (line 1) v=parenc(10,1);

54   Fail
v=parenc(0,11); assert(~isempty(v)) assert(v==0)

Assertion failed.

55   Fail
v=parenc(11,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

56   Fail
v=parenc(3,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint56 (line 1) v=parenc(3,2);

57   Fail
v=parenc(18,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint57 (line 1) v=parenc(18,2);

58   Fail
v=parenc(1,0); assert(~isempty(v)) assert(v==0)

Assertion failed.

59   Fail
v=parenc(9,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint59 (line 1) v=parenc(9,1);

60   Fail
v=parenc(1,19); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint60 (line 1) v=parenc(1,19);

61   Fail
v=parenc(4,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

62   Fail
v=parenc(13,7); assert(~isempty(v)) assert(v==28)

Assertion failed.

63   Fail
v=parenc(8,6); assert(~isempty(v)) assert(v==21)

Assertion failed.

64   Fail
v=parenc(7,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint64 (line 1) v=parenc(7,1);

65   Fail
v=parenc(16,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint65 (line 1) v=parenc(16,2);

66   Fail
v=parenc(16,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

67   Fail
v=parenc(7,8); assert(~isempty(v)) assert(v==28)

Assertion failed.

68   Fail
v=parenc(13,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

69   Fail
v=parenc(4,14); assert(~isempty(v)) assert(v==10)

Assertion failed.

70   Fail
v=parenc(7,8); assert(~isempty(v)) assert(v==28)

Assertion failed.

71   Fail
v=parenc(9,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

72   Fail
v=parenc(4,7); assert(~isempty(v)) assert(v==10)

Assertion failed.

73   Fail
v=parenc(12,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint73 (line 1) v=parenc(12,2);

74   Fail
v=parenc(10,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint74 (line 1) v=parenc(10,1);

75   Fail
v=parenc(17,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

76   Fail
v=parenc(4,13); assert(~isempty(v)) assert(v==10)

Assertion failed.

77   Fail
v=parenc(11,1); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint77 (line 1) v=parenc(11,1);

78   Fail
v=parenc(10,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

79   Fail
v=parenc(7,7); assert(~isempty(v)) assert(v==28)

Assertion failed.

80   Fail
v=parenc(6,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

81   Fail
v=parenc(5,13); assert(~isempty(v)) assert(v==15)

Assertion failed.

82   Fail
v=parenc(10,10); assert(~isempty(v)) assert(v==55)

Assertion failed.

83   Fail
v=parenc(14,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

84   Fail
v=parenc(8,4); assert(~isempty(v)) assert(v==10)

Assertion failed.

85   Fail
v=parenc(14,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

86   Fail
v=parenc(0,20); assert(~isempty(v)) assert(v==0)

Assertion failed.

87   Fail
v=parenc(0,1); assert(~isempty(v)) assert(v==0)

Assertion failed.

88   Fail
v=parenc(1,10); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint88 (line 1) v=parenc(1,10);

89   Fail
v=parenc(13,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

90   Fail
v=parenc(0,9); assert(~isempty(v)) assert(v==0)

Assertion failed.

91   Fail
v=parenc(1,17); assert(~isempty(v)) assert(v==1)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint91 (line 1) v=parenc(1,17);

92   Fail
v=parenc(0,2); assert(~isempty(v)) assert(v==0)

Assertion failed.

93   Fail
v=parenc(2,0); assert(~isempty(v)) assert(v==0)

Assertion failed.

94   Fail
v=parenc(4,12); assert(~isempty(v)) assert(v==10)

Assertion failed.

95   Fail
v=parenc(11,9); assert(~isempty(v)) assert(v==45)

Assertion failed.

96   Fail
v=parenc(18,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint96 (line 1) v=parenc(18,2);

97   Fail
v=parenc(15,3); assert(~isempty(v)) assert(v==6)

Assertion failed.

98   Fail
v=parenc(16,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint98 (line 1) v=parenc(16,2);

99   Fail
v=parenc(17,2); assert(~isempty(v)) assert(v==3)

Error using nchoosek (line 65) K must be an integer between 0 and N. Error in parenc (line 2) nchoosek(min(L, R)-1, 2); Error in TestPoint99 (line 1) v=parenc(17,2);

100   Fail
v=parenc(14,5); assert(~isempty(v)) assert(v==15)

Assertion failed.

### Community Treasure Hunt

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

Start Hunting!