Ad
  • Custom User Avatar

    you need to optimize your code, so that it could run less than 12000ms.

  • Custom User Avatar

    To be more explicit: Are you sure you want to return inside the loop?

  • Custom User Avatar

    How many times does the loop execute?

  • Custom User Avatar

    It's a bit tricky to see without the indentation. (Try wrapping your code in tripple backticks to make it look better.)

    I think that your code probably wouldn't pass is_merge("ab", "b", "a"), which should be True. Maybe it will be clearer if you figure out why.

    Good luck and let me know if you want more specific help. :-)

  • Custom User Avatar

    The values you see are quantities of each value, not the value itself.
    Each "troop" has a specified value (in the description), you don't just add it up. You forgot to mutiply the corresponding value for each race, giving their final good score and final evil score.

    Read the Kata description fully if you have a problem with a Kata - "Even though my solution is correct".

    Example:

    0 0 1 1 1 0        /  0 0 0 0 0 0 1
    Elf + Dwarf + Eagle / Wizard
    3 + 3 + 4 / 10
    10 / 10
    
    10 == 10 therefore it is a draw
    
  • Custom User Avatar

    Python 2.7 works perfectly fine - double check your code. Make sure you read the description correctly and give each troop a value,

    Each "troop" has a specified value (in the description), you don't just add it up using binary.

    Example:

        0 0 1 1 1 0        /  0 0 0 0 0 0 1
    Elf + Dwarf + Eagle    /  Wizard
     3  +   3   +   4      /    10
           10              /    10
    
    
    10 == 10 therefore it is a draw
    

    It's hard to understand what you mean without context. If you are still having problems, just post code down below so I can see what's wrong.