• Custom User Avatar

    kata is good

  • Custom User Avatar

    thank you all very much! got it.

  • Custom User Avatar

    If no one checks earlier, then I will try to look at the weekend.

    Thank you for your contribution!

  • Custom User Avatar

    Thank you warriors!

  • Custom User Avatar

    Follow the example and find the mistake by yourself. Write, please, if it doesn’t help.

    for input [2, 0, 2, 4, 4, 0, 4, 3, 0, 0, 0, 1, 0, 0, 2, 4, 0, 1, 3, 4, 2, 0, 2, 1, 4, 2, 0, 0, 1, 3, 1, 4, 4]

    right yours
    0	0
    100	100
    100	100
    200	200
    1400	1400
    2600	2600
    2600	2600
    5000	3800
    5600	4100
    5600	4100
    5600	4100
    5600	4100
    5680	4140
    5680	4140
    5680	4140
    5980	4440
    9580	8040
    9580	8040
    9700	8160
    10600	9060
    15400	13860
    15800	14260
    15800	14260
    16200	14660
    16360	14820
    21160	19620
    21660	20020
    21660	20020
    21660	20020
    21860	20180
    23360	21380
    23560	21540
    30760	27540
    
  • Custom User Avatar

    Try to figure it out yourself with an example:

    for input [2, 0, 4, 2, 2, 3, 0, 0, 3, 3]

    correct

    100
    100
    1300
    1400
    1500
    2100
    2100
    2100
    2700
    3300
    

    your

    100
    100
    1300
    1400
    1500
    1800
    1800
    1800
    2100
    2400
    

    You need to fix a little your calculation.

  • Custom User Avatar

    Not a kata issue, your code is wrong, use Question label for that. You're handling levels wrong, check again the kata description.

  • Custom User Avatar

    Note that after increasing the level, the total number of cleared lines is not reset.

    That.

    Not a kata issue.

  • Custom User Avatar

    i am running the random tests while attempting to submit my code and it seems that the math in the tests is not correct. I am testing Python solution.
    For example i have got the following message after running my code:
    Failed when arr = [1, 4, 1, 4, 1, 4, 1, 1, 2, 0, 0, 4, 2, 3, 3, 3, 3, 4, 0, 0, 1, 2, 1, 0, 1, 2]: 18180 should equal 18620
    well. let's see:
    level 0: 1,4,1,4: 40+1200+40+1200 = 2480
    level 1: 1,4,1,1,2,0,0,4: 80 + 2400+80+80+200+0+0+2400 = 5240
    level 2: 2,3,3,3 : 300+900+900+900 = 3000
    level 3: 3,4,0,0,1,2: 1200 + 4800 + 0 + 0 + 160+400 = 6560
    level 4: 1,0,1,2: 200+ 0 + 200 +500 = 900
    score = 2480+5240+3000+6560+900 = 18180

    some of the tests are passed and some of them are incorrect as the one above. could you please check if I am missing something or the test case is really incorrect?

  • Custom User Avatar

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