You have to program to determine the set and the base so that your result is the minimum possible number. The result given in the problem description is just a sample and not the minimum one.
Mahendra Kariya wrote: > @Huy, do u mean the mapping is done at random and even the base is > chosen randomly? > > Regards, > Mahendra Kariya > http://www.mahendrakariya.blogspot.com > > > On Sun, Sep 13, 2009 at 5:26 PM, Huy Phan <dac...@gmail.com > <mailto:dac...@gmail.com>> wrote: > > > Actually it's 31536000 (not 31356000) and 12314555(not 1231455) as > described in the problem. > Let's say the input is ab2ac999 then you have ['a','b','2','c','9'] is > the set of characters. > We can map this set to another set : [3,1,5,6,0]. > Which mean character 'a' represents for 3, 'b'->1, '2'->5 ..... > then you have the number 313560000, after that you can choose whatever > base for this number, here in the example, they choose 10. > > if you choose the set [1,2,3,4,5] to map, and with base 6, you > will have > the second result. > > Mahendra Kariya wrote: > > can someone explain how ab2ac999 is 31356000 in base 10 or > 1231455 in > > base 6? > > > > > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-code?hl=en -~----------~----~----~----~------~----~------~--~---