Cody

# Problem 2324. GJam 2014 Rd 1c: Train Cars

Solution 444357

Submitted on 20 May 2014 by mmmriva
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
%% s='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj qqqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnnnnnlllllllllllllllhhhhhhhhhhhhhhhhhh ssssvxxxxbbb uuuuuuuuuuuuuuuuuutttttttttttttttttttttttttffffffffffffffffffffffffffffff uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu gggwwwwwwwrrrrrraaaaoooooooppppppyyyyyyyeeeeeeeccccccccccdddddddmmmmmmmzzzzzzkkkk uuuuuuuuuuuuuuuuuuuuuuuuuuuuu'; Vexp=1440; val=train(s); assert(isequal(Vexp,val))

val = 1440

2   Pass
%% s='ffvvuaaaaddbbbkzzz yynnneerrrxxxx iiiiiwqssssyy mmmmmmmmmggggggggg llltttpjjhhoo'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

3   Pass
%% s='sssssssssssssssssss wwuuunnnmmgggggpzz kkkhhhdddjjqfxxaaye ttttttt oooooooooooooooooooo'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

4   Pass
%% s='ssssssssssssssssssss zzkkkkkeuuiii gyyynnffpooxhhhjtt lllllllcccc dddddddwwwwwmmmaaa cccbbbrrrrrrrrrr'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

5   Pass
%% s='uueeennnbbdjjxx oooooooogg sssssaaaaaww iiiiiiiiiiiii yyssss iiiirrrryyyyy ggghhhfiii kkkqqqqzzzzzzzmmmm pppppppppccccc'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

6   Pass

7   Pass
%% s='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww wwww sssssssssssssssssssssssssssssssssssssssssssss hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh llllpppppppppeeeeeeejjjjjjjmmmmoooggkkkkdddddbbbxxxxxfffffffvvvvtttaazzzzzzuuuuuuuuucc wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii wwwwwwwwwwwwwwwwwyyyyyyyyyyyyyyyyyyyyyyyyyyyyyynnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnniiiiiiiiiiiiiii'; Vexp=1440; val=train(s); assert(isequal(Vexp,val))

val = 1440

8   Pass
%% s='cd bc ab'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

9   Pass
%% s='ggggggggggggggg hhhhwzziiiiyyyyaaaa gggggggggg bbbbbbbbbbbbbb spjttfllllnncqr kkkkkdddddeeeeevvvvv ggggggg mmmmmmmmmmmmm gggggggggggg'; Vexp=17280; val=train(s); assert(isequal(Vexp,val))

val = 17280

10   Pass
%% s='iilhzzattttdddjjkk wwwwwwwww uuuuuuiiiiiiiiii fggbn xxxxxxxxxxmmmmm'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

11   Pass
%% s='tttvvsqqrrrriicccc aaaaaaaaaaaaaaaaaa ggggggggggxxxxxxxxx hheefyyydd zzzzzzzznnnnllllmmmm wwuuuk jjjjj ddddddppppppppp mmmmmmmooooooooo pppppbbbbbbbjjjjjjjj'; Vexp=720; val=train(s); assert(isequal(Vexp,val))

val = 720

12   Pass
%% s='nnrrsssplye iggwwwwnnnn'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

13   Pass
%% s='mmmmmmmmmmmmmmmmmmmmmddddddddddddddddd mmmmmmmmmmmmmmmmmmmmm ddddddddddddddjjjjjjjjjjjjjjrrrrrrrrrrrrrrrrrrrrrrttttttttttttttttt ttttzzzzzzzzvvvvvvvvhhhhhhhhccccllllllllyyyyyyaaaaeeeeeeeeiiiiiiiiii iiiiiiiiwwwwwwwooooooooppppkkkkk'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

14   Pass
%% s='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ttttttttttttttttttttllllllllllllllllllllllllllllccccccccccccccccccccccccccccooooooooooooooooooooooo iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiisssssssssssssssssssssssssssssss bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb gggggxxxxxxrrrrnnnnnnnnmmmmkkkkuuuuuuuuyyyyyhhheeeezzzzffffffffjjjvvvvv bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb qqqqqqqqqqqqqqqqqqqqqqqqqqqqqaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ppppppppppppppppppppppppwwwwwwwwwwwwwwwwwwwwwwwddddddddddddddddddddddd'; Vexp=17280; val=train(s); assert(isequal(Vexp,val))

val = 17280

15   Pass
%% s='ggggpttt iiiiiiiiii iiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiii fffffffffkkkkkkkkkaa vwwnjssbbbhxxxqqr lllllccccmmuuuuu iiiiiiiiiiiiiiii iiiii'; Vexp=14400; val=train(s); assert(isequal(Vexp,val))

val = 14400

16   Pass
%% s='kavdczugmoesxvalrdmkcpowwxcnhumcfkzakzbdftweqhxmcfrkziqbyoeziuvitserfjiggoubonggswxlkpkoundgmayxiapv'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

17   Pass
%% s='abc'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

18   Pass
%% s='iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii mmmmmmmmmmmmmmvvvvvvvvvvvvvvvvrrrrrrrrrrrruuuuuuuuuuuuuuussssssssssssssssssnnnnnnnnn ffffkwweeebbbbccctttppjjjggggggaaaayyddddddxxxxxx hhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiihhhhhhhhhhhhhhh'; Vexp=12; val=train(s); assert(isequal(Vexp,val))

val = 12

19   Pass
%% s='cclevhhpn ywuuccc'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

20   Pass
%% s='jjjjjjjjjjhhhhhllllllltttttmmmmmmmmmkkkkkkoooyyyyyyyyyyyycccccnnnnzzzzzzssssssbbbbbbbbbbgggggggg uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwweeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrrrrrrraaaaaaaaaaaaaaaaaaaaaaaaaaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq eeeeeeeeeeeeddddddddddddqqqqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

21   Pass
%% s='yyxxxmmmmhhhhhuuuujjlllllliiiiiieeeccccggbzzzzaaafff wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww vvvvsssssskkkknn rrrrrrrrrrrrrrrrrrrrrqqqqqqqqqqqqqqqqqqqqpppppppppppppppppp ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo tttttttttttttttttttttttttttttttttttttttttttttttttttttt tttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt dddddddddddddddddddddddddddddddddddddddddddddddddddddddddd'; Vexp=10080; val=train(s); assert(isequal(Vexp,val))

val = 10080

22   Pass
%% s='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr vvvvvjjjjggggggmmmmmlllllppppppppfffffiiiiiiiidddddddeeeezsssssbbbbbbuuuuu qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

23   Pass
%% s='xxxvvvvaaaaylsqqkg ddcccpttmm nnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnn jjjjjuuuuhhhhhhhh ziiiddddd'; Vexp=48; val=train(s); assert(isequal(Vexp,val))

val = 48

24   Pass
%% s='g i uvbm iog k rdi'; Vexp=6; val=train(s); assert(isequal(Vexp,val))

val = 6

25   Pass
%% s='ccaallttwniiiiiixxhh rrrrfffffbbeeeuuuuuuuggggggyycccc sssssssssssssssvvvvvvvvvvvvvvrrrrrrrrrrrrrrrrrrr'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

26   Pass
%% s='rrrrrrkkkkknnnnnnllsssssssssssssscccccccppppppddddddddmmmmmmwwwwwwqqqqqqiiitttttttjjjjjjjjjjj uuuuuuuuurrrrrrrr'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

27   Pass
%% s='ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh vzaaappssooookkkkyyyyffbbbwwwiiiiiiiirrrllqqqqeexxddnncg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

28   Pass
%% s='ccccccccccccccccccccccccccccccccccccccccccccccczzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwwwwwffffffffffffffffppppppppppppppppppccccccccccc'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

29   Pass
%% s='zzzzzzzzttttttttttthhhhhhhxxxxxxbbbbbbbwwwwwwwyyypppooooorrrnnnnnnuuuggaammmmmkkkkkccccvvvvvllllllll iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss'; Vexp=40320; val=train(s); assert(isequal(Vexp,val))

val = 40320

30   Pass
%% s='eeeeeeeeeeeeee hhhhhhhh xxxxxxxxxxxxxxxxxxxx iiiaanwwwrrbbbb hhhhhhhuuuuuuuuuuu dddddddtttttttttiiii gggggggggzzzzzzz qqqqccfvvvoyyykjjmm bblllllppppp'; Vexp=720; val=train(s); assert(isequal(Vexp,val))

val = 720

31   Pass
%% s='ttttttttttttttttttttttttttttttttttttcccccccccccccccccccccccccccccccccccccccc ttttttttttttttttttttttttttttttttttttttttttttttt ccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ppppppppppppppppppppp ccccccccccccccccccccccccccccccccccccccccccc pppppppppppppppppppppppppppppppppppppppppppppppppppp pppppppppppppppppppppppppppppppppppppppttttttttttttttttttttttttttttttttttt pppppppppppppppppppppppppppppppppppppp'; Vexp=48; val=train(s); assert(isequal(Vexp,val))

val = 48

32   Pass
%% s='abc bcd'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

33   Pass
%% s='eeeeeeeeeeeeeeaaaaaaaaaaaadddddddddddddddd zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz wwwwwwvvvvvqqqqqqqqyyyyyyyyyyyyy yyyyyyyyyyyyyyyyyyyyylllllllllllllllluuuuuuuuuuuuuuuuuuuuuuuuuzzzzzzzzzzzzzzzzzzzzzzzzzzzz ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff eeeeeeeeeeeeeeeeeeeee rrrrrrrrrrrrrrrrkkkkkkkkkkkkkkkkkkkkkkkk dnnnnnnnnnpppppxxxxxxffffffff'; Vexp=6; val=train(s); assert(isequal(Vexp,val))

val = 6

34   Pass
%% s='mmmmmmmffffffffffffkkkkkkkkkkkkkkkkkkkdddddddddddddd oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo oooooooooooommmmmmmmmmmmmmmmmmmmmmm'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

35   Pass
%% s='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeennnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'; Vexp=720; val=train(s); assert(isequal(Vexp,val))

val = 720

36   Pass
%% s='ggggggggqqqffffffmmmiiiiiiiuuuuuuueeeeeeyyyyyyddddddddkkkkkkvvvvvvvrrrrppllllllllbbbbbwwwwwwwwjjjjjj xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhzzzzzzzzzzzzzzzzzzzzzzzzzz aaaaaaaaaaaaaaaaaaaaaaaaaaaaaassssssssssssssssssssssstttttttttttttttttttttttnnnnnnnnnnnnnnnnnnnnnn'; Vexp=6; val=train(s); assert(isequal(Vexp,val))

val = 6

37   Pass
%% s='bbbbbuuuuussfffffvvvkkhhheeeyyyyyjjqqqqqnnn ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd llllllllllllllllllllllllllllllllllllllllwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww ggggggmmmmmmmmmmmmiiiiiiiiiaaaaaxxxxxxxxzzzzzzzzzzzooooooooo'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

38   Pass
%% s='bbbbbbbbbbbbbbbbrrrrrrrrrrrrrrrrrrvvvvvvvvvvvvvvvvvvvvssssssssssssssssssssswwwwwwwwwwwwwwlllllllll uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu qqq yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyykkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk cccccccccoooooppppppppppppppjjjjjjjjjjjqqqqqq kkehhhhxxxftiiib qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqddddddddddddddddddddddddddddnnnnnnnnnnnnnnnnnnnnnnnnnnnnn uuuuuuuuuuuuuuuuuuuuuuuuuuuuuccccccccccccccccccccccccccccc nnnnnnnnnnnnnnnnnnnnnnnnnnnnmmmmmmmmmmmmmmmmmmmmmggggggggggggggggyyyyyyyyyyyyyyyyyyyyyyyyyy'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

39   Pass
%% s='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjggggggggggggggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa hhhhhhhhhhhhhhh zzzzzzzzzzzzzzzzzzzzvvvvvvvvvvvvvvvvuuuuuuuuuuuuuuuuuuuuuuuupppppppppppppooooooooooooooooooooooo hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhh iiiiiiiiiiiiiiiiiiiiiiiiiiiiinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnneeeeeeeeeeeeeeeeeeeeeeeeeeeeeee hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh wwwwccccffffrrqqqqqqbbttttttdddddddxxxllllllllllyyyyyyyymmmmmmkkkkkksssssss'; Vexp=86400; val=train(s); assert(isequal(Vexp,val))

val = 86400

40   Pass
%% s='uuuuuuuyyyyyddddddddqqqqqttttttbbbiiiiiiiaaahhh ooooooooogggggguuuuuuuuuu'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

41   Pass
%% s='ggggggoooooeeeyjjqqqqqqq mmmmmttttddddddrrraaaaaaaaallllllllzzzzzzzzzzzznnnnnnnnnnnnnnwwwwwwwggggg'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

42   Pass
%% s='kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx eeeeeaaaaaaaaaawwwwwwwwwwwwzzzzzzzzzzzzzsssssssssssssssqqqqqqqqyyyyyyyyyyyyyyyvvvvvvvvvvvvvvffff dddddddddddddddddddddddddddddddddhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh jjjjjjjjjjjllllllllllllllllllloooooooooooooooooooooooooocccccccccccccccccccrrrrrrrrrrrrrrrrrrrr ggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

43   Pass
%% s='aa aa bc'; Vexp=4; val=train(s); assert(isequal(Vexp,val))

val = 4

44   Pass
%% s='kkkkkkrrynnn vvvvvvvvvvvvvvvvvvvv jhhppibllllddddaooff nqqqwwwwwsss xmmmmmmmtttucc zzzzzzzzzzzzzzzzzzzz eeeeeeeeeeeee'; Vexp=720; val=train(s); assert(isequal(Vexp,val))

val = 720

45   Pass
%% s='fffffffffffffffffffffffffffffffffffffffffffffffffffffeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee ccccccccccccccccccccccccccccccc ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyygggggggggggggggggggggggggggggggggggg sssssssshhhhhhhhhhhhhhhhzzzzzzzzzzzzzooo nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnssssssssssssssssssssssssssssssssssssssssssssssss sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss jjjjjxxxxrrriiitttttttwwwwpppppkddddddddqqqqaaaaallllllvvbbuuuuummmm nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

46   Pass
%% s='yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuukkkkkkkkkkkkkkkkkkk xxxxxxxxxxxxxvvvvvvvvvvvvvveeeeeeeeeeeeeeeeeegggggggggggg mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ppppppppwwwwwwwiiiiiiiiiqqqqqsssaaaaaaaaalllllllllttttnnnnnnnddddddddhhhhhhhjjjjjjjrrrrroooooooo kkkkkkkkkkkkkkkkkkkkkkk zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzzzzzzzzzzzzzzzzzzyyyyy cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk'; Vexp=240; val=train(s); assert(isequal(Vexp,val))

val = 240

47   Pass
%% s='rrrrrrrbbbbbbbbb sslll rrrrsss mmmmmmddddd lllllllooo ooooooommmm'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

48   Pass
%% s='eeeeeeeeeeeeeeeeee xxmmmmm rrrrrrrrrrrrrr iiiii hhgdddfccbbqqqnniii ppppppppppppppp aayyyy oooooooooooooooooooo wwvsssszzzkkttllljjj uuuuuuuuuuuuuuuu'; Vexp=362880; val=train(s); assert(isequal(Vexp,val))

val = 362880

49   Pass
%% s='jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj jjjj'; Vexp=6; val=train(s); assert(isequal(Vexp,val))

val = 6

50   Pass
%% s='xxxxxxxx xxxxxxx iiavvvvppjjnnnzzzr gkkkuuwwsscccmmmmeed hhhqqqqqqqqqoooooo llllllllxxxxxxx bbyyttttttffffff'; Vexp=240; val=train(s); assert(isequal(Vexp,val))

val = 240

51   Pass
%% s='kkkkddddmmccssbb ppppppppppppp rryyyyyyqiiezzuhhx wwwwwwwwww ppppppppp aaaaaaooooooooo jjjjjjjjjjjjjjjjjjj ffffffffffffffffffff ggggggggvvvvvvtttttt lllllllnnnnnnnnnnnnn'; Vexp=725760; val=train(s); assert(isequal(Vexp,val))

val = 725760

52   Pass
%% s='aaaaaaaaaaaaaaaaaaavvvvvvvvvvvvvvvvvvvvv vvvvvvvvvvvvqqqqqqqqqqqqqqqkkkkkkkkkmmmmmmmmmm mmmppppppppppppppxxxxxxxxxxxxxxxxxxxxcccccccccyyyyyyyyyyyyyyeeeeeeeeeeeeehhhhhhhhh'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

53   Pass
%% s='zzzzzzzzzccccccccccchhhhhhhhhhffffffffffdddddddddaaaaaaaaavvvvvvvvvvvvvv rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr rrrrrpppppppppppppmmmmmkkkkkkkkkkooooooooonnnnnnnntttttteeeeeellllljjj'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

54   Pass
%% s='zzzzzzzzzzzzzzzzz nnnffooqqqsdeeegrrmm hhhhhhhhhcccccccccc wwwwwwwwwwuuuuuuuuuu jlllkkkx cccccaaaaapppijjjjj bbbbhhhhhhhhhhhhhh yyyyyyyvvvvvvvvvvvv'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

55   Pass
%% s='ccccccccccccccc bbbbbbbbbwwwwwwww lllllllllllll peezzzuuiisoodtttfff mmmmmmmmmmmmmmmmm qqqyyyyyyyyyrr'; Vexp=720; val=train(s); assert(isequal(Vexp,val))

val = 720

56   Pass
%% s='tqqxvveggggccdda oooott'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

57   Pass
%% s='qqqqwwooooommhhhhhhhhlllllllsssssddddnnnniiiiiexxxxxxxxxttttffyyyyyyyybbbbbccggggggkkkkk qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

58   Pass
%% s='cccccccccccccccfffffffffffffffffffffggggggggggggmmmmmmmmmmmmmmmmmmoooooooooooqqqqqqqqqqqqq uuuuuuuuuuuuuuuuuuuuuuubbbbbbbbbbbbbjjjjjjjjjjjjjdddddddddddddddddd qqqqqqqqqqqqnnnnnnnnnnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkkkkk kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkttttttttttttttttttttttttttttttttttttttaaaaaaaaaaaaaaaaaaaaaaaaaa'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

59   Pass
%% s='ccccccccgggggggggggg wwwwww oooooooooo zzzzzzzzzzzzzzz rrttttttfffmm hhhhhhhhhbbbbvvvvvv xxxlnnpssddddijaoo yyyyyyyyyyyyyyyyy'; Vexp=5040; val=train(s); assert(isequal(Vexp,val))

val = 5040

60   Pass
%% s='p'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

61   Pass
%% s='qqqgguuuuctmmmmddjor rrrrrrrrrrrrrrrrrr'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

62   Pass
%% s='ab ab'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

63   Pass
%% s='qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqfffffffffffffffffffffffffffffffffffffffffff rrrrrrllllllllllyyyyyy oooooooooooovvvvvvvvvvvvvvvvvvviiiiiiiwwwwwwwwwwwwwwcccccccccccccc mmmmmmmmmmmmmmmzzzzzkkkkkknnnnnnnnnbbbbbbbbaaaaaaaaaa aaaaaappppppgggggggghhhhhhhhhhhqqqqqqqqqqqqq ttttttttttttttttttjjjjjjjjjjjjjjjjjjjjuuuuuuuuuuuuuuuuuuuuuussssssssssssssssss fffffffeeeeeexxxxxttt yyyyyyyyyyyyyyyyyyyyyyydddddddddddddddmmmmmmmmmmmmmmmmmmmmmm'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

64   Pass
%% s='uuuucccccccccccxxxxxxxxxxxxxx nnnnnnnnffffflllllllliiiiiiihhhhhhzzzzzzzzzzzzeeeeeeeeeeqqqqqqq kkkkkkkkkkkkkkkggggggggggggggggggggggaaaaaaaaaaaaaaaaaaaaauuuuuuuuuuuuuuuuuuuuuuuuuuu'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

65   Pass
%% s='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn hhhhkkkkkkkkkkkkkaaaaaaaoooooommeeeeeevvvvvvvvzzzzxxxxxxxxrrrrrrr lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll ccccccccyyyyyuuuuuuiiqqqqqqqqqqddddddjjjjjtttttttbbbbbffffssssswwwwwwwwwgggppppppp'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

66   Pass
%% s='mmmmmmiiiii cccccccccccccccccccc hhhhhhhhhhhhhhhhh aooryzzkvvvblffff cccccccpppppqqqqq'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

67   Pass
%% s='cccccccccc ccjjill'; Vexp=1; val=train(s); assert(isequal(Vexp,val))

val = 1

68   Pass
%% s='dddrrnnnnnj pppppvvvvmmmmmmoo ttttttttttttttt jjjjjjjjiiiiiiiii uullwaaaagykxxxxbe iiiiiiiiiiizzzzzzz ffffffffffssssssss'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

val = 120

69   Pass
%% s='abc a a'; Vexp=2; val=train(s); assert(isequal(Vexp,val))

val = 2

70   Pass
%% s='qqeebbccggy uuuuufff snittojvwwwpx ddddaaaaaaaammmmmmm rrrrrrrrrrrr fffllllllhhzzzddddd'; Vexp=24; val=train(s); assert(isequal(Vexp,val))

val = 24

71   Pass
%% s='nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn gggggooojjjuuuummmmrrrrrttppppwwwwwaaaaaahhhhhhfffffkkkbbbbccccceeeezzzvvv nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'; Vexp=80640; val=train(s); assert(isequal(Vexp,val))

val = 80640

72   Pass
%% s='eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeezzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz nnnnnnnnnnnnnnnsssssssssssssiiiiiiiiiuuuuuuuuuuuuuuuuu lllllllllllllffffffffffvvvvvvvgggggghhhhhhhh bbbbrrrrrqqqqwwwwmmkkkoooooaaayy hhhhhhhhhhhhhxxxxxxxxxxxxxppppppppppppppppppppptttttttttttttttttteeeeeeee'; Vexp=6; val=train(s); assert(isequal(Vexp,val))

val = 6

73   Fail

### Community Treasure Hunt

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

Start Hunting!