Cody

Solution 452801

Submitted on 10 Jun 2014 by Alfonso Nieto-Castanon
  • Size: 98
  • This is the leading solution.
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))

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

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

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

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

6   Pass
%% s='aaaaabbbbcccdddddeeefffffffggggghhiiijjjkkkkklllllmmmmnnnoooopppqqqqrrrsssstttttttuuuuuvvvwwwxyyzzza'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

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

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

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

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

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

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

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

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

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

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))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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))

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

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

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

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

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

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

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

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

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

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

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

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

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

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))

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

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

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

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

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

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

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

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

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

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

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

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

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

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))

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

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

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

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

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

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

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

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

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

73   Pass
%% s='gggggggggtttttttqqqqqqxxxxxxxxkkkkkkkkyyyymmmmmmmmmwwwwwwwoooooooooooooeeeeeee pppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppppp ssssssssssssssssssssssssssssssssssssssssssssssssssssssss iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd fffrrraahhhhhlllllccbbbbvvzz jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu'; Vexp=362880; val=train(s); assert(isequal(Vexp,val))

74   Pass
%% s='wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww xxxxxxxxxxxxxxxxxxxxxxxxxxxooooooooooooooooooooooooooooobbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb fffiiaaauuurrrddeevvvhhhhgqqqcccccnnnpyyyyssmmmmtzkkkk jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj lllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll'; Vexp=120; val=train(s); assert(isequal(Vexp,val))

75   Pass
%% s='a ca a abc'; Vexp=0; val=train(s); assert(isequal(Vexp,val))

76   Fail