Ad
  • Custom User Avatar

    Your method with a big number seems to be... not big enough :D You should print the input to see for yourself.

  • Default User Avatar

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

  • Default User Avatar

    I'm sorry! First, I combined all the tests into one. Secondly, my mistake was that I did not understand that it was necessary to reduce numbers when dividing integers.
    The length of my code is 100 lines. I was surprised when I saw a short solution from other people(as always). A good kata, thanks!

  • Default User Avatar

    I tried your code: your printing is such that it is impossible for you to identify each test; there is no test with

    a = arrayOf(intArrayOf(1, 2), intArrayOf(2, 9), intArrayOf(3, 18), intArrayOf(4, 24), intArrayOf(6, 48), intArrayOf(1, 2), intArrayOf(1, 3), intArrayOf(1, 4), intArrayOf(1, 3), intArrayOf(5, 3))
    
    

    What is above is the concatenation of the first three basic test in "ATTEMPT".
    Moreover notice that 34 people passed the kotlin kata. If there were errors somebody would have seen them before you.
    Your code is wrong somewhere; sorry. Cheers!

  • Custom User Avatar

    are you mutating the input?

  • Default User Avatar

    Kata does not work correctly in Kotlin. Example,
    a = arrayOf(intArrayOf(1, 2), intArrayOf(2, 9), intArrayOf(3, 18), intArrayOf(4, 24), intArrayOf(6, 48), intArrayOf(1, 2), intArrayOf(1, 3), intArrayOf(1, 4), intArrayOf(1, 3), intArrayOf(5, 3))

    Result should be [307, 72]
    But in kata [6, 3]

    The author, please fix it. Can't complete kata!