Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Error "Process was terminated. It took longer than 12000ms to complete"
    What is needed here?

  • Custom User Avatar

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

  • Custom User Avatar

    Your issue. You deleted the module Codewars.Kata.Unique where line.

  • Custom User Avatar

    Fixed

  • Custom User Avatar

    to the string characters

  • Custom User Avatar

    How many times does the loop execute?

  • Custom User Avatar

    Unable to submit this kata. Server error or memory error.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • 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

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Your code is correct, your return statement for evil is incorrect.

    Your code is returning "Battle Result: Evil triumphs over Good", and it should be "Battle Result: Evil eradicates all trace of Good".

  • 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

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Python 2.7 version works perfectly fine. There should be an error when no code is entered within the function because functions by their very definition can't be empty.

  • Loading more items...