Ad
  • Custom User Avatar

    Absolutely the same issue in Golang.
    Look at this output:

    [121 144 19 161 19 144 19 11]
    [121 14641 20736 361 25921 361 20736 361]
    true
    
    [121 144 19 161 19 144 19 11]
    [231 14641 20736 361 25921 361 20736 361]
    false
    
    [121 144 19 161 19 144 19 11]
    [121 14641 20736 36100 25921 361 20736 361]
    false
    
    []
    []
    true
    
    []
    [25 49]
    false
    
    [121 144 19 161 19 144 19 11 1008]
    [121 14641 20736 36100 25921 361 20736 361]
    false
    
    [-10000000 100000000]
    [100000000000000 10000000000000000]
    true
    
    [10000001 100000000]
    [100000000000000 10000000000000000]
    false
    
    [2 2 3]
    [4 9 9]
    false
    
    [2 2 3]
    [4 4 9]
    true
    
    [-121 -144 19 -161 19 -144 19 -11]
    [121 14641 20736 361 25921 361 20736 361]
    true
    
    []
    [121 14641 20736 361 25921 361 20736 361]
    false
    
    []
    []
    true
    Test Failed
    Log
    Expected
        <bool>: true
    to equal
        <bool>: false
    
  • Default User Avatar

    I guess you don't need to calculate the cube of each digit since an odd number will always have an odd cube and an even number will always have an even cube. The modulo 2 of the sum will always be the same.

  • Default User Avatar

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

  • Default User Avatar

    Not a kata issue. No errors in tests. Before posting isssues note that 706 people passed the Go kata.