• + 3 comments

    I came up with same logic, but for input 6 3 1 3 2 6 1 2 my answer is 10 instead of 5.. i think its counting reverse combination too. ex: 0,3 and 3,0 if its divisible by k.