Cody

Problem 42291. GJam 2015 Rd1B: Counter Culture

Solution 668280

Submitted on 8 May 2015 by Alfonso Nieto-Castanon
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

2   Pass
%% N=1; L=Counter_Culture(N); Lexp=1; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

3   Pass
%% N=19; L=Counter_Culture(N); Lexp=19; assert(isequal(Lexp,L))

4   Pass
%% N=23; L=Counter_Culture(N); Lexp=15; assert(isequal(Lexp,L))

5   Pass
%% N=1101; L=Counter_Culture(N); Lexp=150; assert(isequal(Lexp,L))

6   Pass
%% N=998999; L=Counter_Culture(N); Lexp=3334; assert(isequal(Lexp,L))

7   Pass
%% N=990000; L=Counter_Culture(N); Lexp=3425; assert(isequal(Lexp,L))

8   Pass
%% N=10110; L=Counter_Culture(N); Lexp=447; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

9   Pass
%% N=11111; L=Counter_Culture(N); Lexp=459; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

10   Pass
%% N=999991; L=Counter_Culture(N); Lexp=3426; assert(isequal(Lexp,L))

11   Pass
%% N=512; L=Counter_Culture(N); Lexp=46; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

12   Pass
%% N=999899; L=Counter_Culture(N); Lexp=3334; assert(isequal(Lexp,L))

13   Pass
%% N=1999; L=Counter_Culture(N); Lexp=328; assert(isequal(Lexp,L))

14   Pass
%% N=11101; L=Counter_Culture(N); Lexp=449; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

15   Pass
%% N=876543; L=Counter_Culture(N); Lexp=2657; assert(isequal(Lexp,L))

16   Pass
%% N=4; L=Counter_Culture(N); Lexp=4; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

17   Pass
%% N=102; L=Counter_Culture(N); Lexp=31; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

18   Pass
%% N=11000; L=Counter_Culture(N); Lexp=1337; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

19   Pass
%% N=1998; L=Counter_Culture(N); Lexp=327; assert(isequal(Lexp,L))

20   Pass
%% N=900000; L=Counter_Culture(N); Lexp=3434; assert(isequal(Lexp,L))

21   Pass
%% N=131072; L=Counter_Culture(N); Lexp=1639; assert(isequal(Lexp,L))

22   Pass
%% N=524288; L=Counter_Culture(N); Lexp=2149; assert(isequal(Lexp,L))

23   Pass
%% N=20; L=Counter_Culture(N); Lexp=20; assert(isequal(Lexp,L))

24   Pass
%% N=789012; L=Counter_Culture(N); Lexp=2435; assert(isequal(Lexp,L))

25   Pass
%% N=200; L=Counter_Culture(N); Lexp=129; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

26   Pass
%% N=109876; L=Counter_Culture(N); Lexp=3213; assert(isequal(Lexp,L))

27   Pass
%% N=11100; L=Counter_Culture(N); Lexp=448; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

28   Pass
%% N=262144; L=Counter_Culture(N); Lexp=1842; assert(isequal(Lexp,L))

29   Pass
%% N=11; L=Counter_Culture(N); Lexp=11; assert(isequal(Lexp,L))

30   Pass
%% N=1001; L=Counter_Culture(N); Lexp=139; assert(isequal(Lexp,L))

31   Pass
%% N=987654; L=Counter_Culture(N); Lexp=2879; assert(isequal(Lexp,L))

32   Pass
%% N=999989; L=Counter_Culture(N); Lexp=3424; assert(isequal(Lexp,L))

33   Pass
%% N=11011; L=Counter_Culture(N); Lexp=359; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

34   Pass
%% N=4096; L=Counter_Culture(N); Lexp=238; assert(isequal(Lexp,L))

35   Pass
%% N=900001; L=Counter_Culture(N); Lexp=1446; assert(isequal(Lexp,L))

36   Pass
%% N=201; L=Counter_Culture(N); Lexp=32; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

37   Pass
%% N=99001; L=Counter_Culture(N); Lexp=437; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

38   Pass
%% N=999999; L=Counter_Culture(N); Lexp=3434; assert(isequal(Lexp,L))

39   Pass
%% N=999900; L=Counter_Culture(N); Lexp=3335; assert(isequal(Lexp,L))

40   Pass
%% N=901; L=Counter_Culture(N); Lexp=39; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

41   Pass
%% N=2201; L=Counter_Culture(N); Lexp=161; assert(isequal(Lexp,L))

42   Pass
%% N=90; L=Counter_Culture(N); Lexp=28; assert(isequal(Lexp,L))

43   Pass
%% N=101; L=Counter_Culture(N); Lexp=30; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

44   Pass
%% N=10111; L=Counter_Culture(N); Lexp=448; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

45   Pass
%% N=31; L=Counter_Culture(N); Lexp=14; assert(isequal(Lexp,L))

46   Pass
%% N=10; L=Counter_Culture(N); Lexp=10; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

47   Pass
%% N=10100; L=Counter_Culture(N); Lexp=437; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

48   Pass
%% N=999998; L=Counter_Culture(N); Lexp=3433; assert(isequal(Lexp,L))

49   Pass
%% N=999000; L=Counter_Culture(N); Lexp=3335; assert(isequal(Lexp,L))

50   Pass
%% N=990001; L=Counter_Culture(N); Lexp=1536; assert(isequal(Lexp,L))

51   Pass
%% N=30; L=Counter_Culture(N); Lexp=22; assert(isequal(Lexp,L))

52   Pass
%% N=900; L=Counter_Culture(N); Lexp=137; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

53   Pass
%% N=101001; L=Counter_Culture(N); Lexp=1538; assert(isequal(Lexp,L))

54   Pass
%% N=999990; L=Counter_Culture(N); Lexp=3425; assert(isequal(Lexp,L))

55   Pass
%% N=989999; L=Counter_Culture(N); Lexp=3424; assert(isequal(Lexp,L))

56   Pass
%% N=21; L=Counter_Culture(N); Lexp=13; assert(isequal(Lexp,L))

57   Pass
%% N=9999; L=Counter_Culture(N); Lexp=336; assert(isequal(Lexp,L))

58   Pass
%% N=100001; L=Counter_Culture(N); Lexp=1437; assert(isequal(Lexp,L))

59   Pass
%% N=10999; L=Counter_Culture(N); Lexp=1336; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

60   Pass
%% N=100; L=Counter_Culture(N); Lexp=29; assert(isequal(Lexp,L))

61   Pass
%% N=91; L=Counter_Culture(N); Lexp=20; assert(isequal(Lexp,L))

62   Pass
%% N=11010; L=Counter_Culture(N); Lexp=358; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

63   Pass
%% N=29; L=Counter_Culture(N); Lexp=21; assert(isequal(Lexp,L))

64   Pass
%% N=2001; L=Counter_Culture(N); Lexp=141; assert(isequal(Lexp,L))

65   Pass
%% N=11110; L=Counter_Culture(N); Lexp=458; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

66   Pass
%% N=10001; L=Counter_Culture(N); Lexp=338; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

67   Pass
%% N=9; L=Counter_Culture(N); Lexp=9; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

68   Pass
%% N=101000; L=Counter_Culture(N); Lexp=2436; assert(isequal(Lexp,L))

69   Pass
%% N=1000; L=Counter_Culture(N); Lexp=138; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

70   Pass
%% N=19; L=Counter_Culture(N); Lexp=19; assert(isequal(Lexp,L))

71   Pass
%% N=12000; L=Counter_Culture(N); Lexp=1348; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

72   Pass
%% N=999; L=Counter_Culture(N); Lexp=137; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

73   Pass
%% N=22; L=Counter_Culture(N); Lexp=14; assert(isequal(Lexp,L))

74   Pass
%% N=1111; L=Counter_Culture(N); Lexp=160; assert(isequal(Lexp,L))

75   Pass
%% N=12001; L=Counter_Culture(N); Lexp=359; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

76   Pass
%% N=12; L=Counter_Culture(N); Lexp=12; assert(isequal(Lexp,L))

77   Pass
%% N=99000; L=Counter_Culture(N); Lexp=1426; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

78   Pass
%% N=999001; L=Counter_Culture(N); Lexp=2436; assert(isequal(Lexp,L))

79   Pass
%% N=899999; L=Counter_Culture(N); Lexp=3433; assert(isequal(Lexp,L))

80   Pass
%% N=10010; L=Counter_Culture(N); Lexp=347; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

81   Pass
%% N=10000; L=Counter_Culture(N); Lexp=337; assert(isequal(Lexp,L))

82   Pass
%% N=10101; L=Counter_Culture(N); Lexp=438; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

83   Pass
%% N=2000; L=Counter_Culture(N); Lexp=329; assert(isequal(Lexp,L))

84   Pass
%% N=111; L=Counter_Culture(N); Lexp=40; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

85   Pass
%% N=999901; L=Counter_Culture(N); Lexp=3336; assert(isequal(Lexp,L))

86   Pass
%% N=2101; L=Counter_Culture(N); Lexp=151; assert(isequal(Lexp,L))

87   Pass
%% N=10011; L=Counter_Culture(N); Lexp=348; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

88   Pass
%% N=2002; L=Counter_Culture(N); Lexp=142; assert(isequal(Lexp,L))

89   Pass
%% N=32; L=Counter_Culture(N); Lexp=15; assert(isequal(Lexp,L))

90   Pass
%% N=110; L=Counter_Culture(N); Lexp=39; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

91   Pass
%% N=2100; L=Counter_Culture(N); Lexp=240; assert(isequal(Lexp,L))

92   Pass
%% N=11001; L=Counter_Culture(N); Lexp=349; assert(isequal(Lexp,L))

[Warning: Integer operands are required for colon operator when used as index] [> In Counter_Culture (line 3) In evaluateCode', '/users/mss.system.OUHNz9/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

93   Pass
%% N=99; L=Counter_Culture(N); Lexp=28; assert(isequal(Lexp,L))

94   Pass
%% N=1100; L=Counter_Culture(N); Lexp=238; assert(isequal(Lexp,L))

95   Pass
%% N=1099; L=Counter_Culture(N); Lexp=237; assert(isequal(Lexp,L))

96   Fail