• + 1 comment

    Im not sure of this solution. This will not be working with this input:

    5
    1 2 1 3 3
    3 2
    

    The output should be 2 but will be 3 because it will count last digit of the series 3. This solution does not consider what if solution will be shorter than a month digit.

    Sure, this will pass all validators but still... :).