• + 0 comments

    Hi here is my Python solution. I can take any suggestions .

    def divisibleSumPairs(n, k, ar):
    # Write your code here
    count=0
    for index ,i in enumerate(ar):
        for index2 ,item in enumerate(ar):
            if(index!=index2):
                 if ((i+item)%k==0):
                    count=count+1
    
        print(int(count/2))
    return int(count/2)