We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
No. For your example with k=6, if the input were [a0,a1,a2,a3] = [1,5,5,1], then both of the (5,1) (that is, (a1,a3) and (a2,a3)) count because in both cases i < j. (1 < 3 and 2 < 3)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Divisible Sum Pairs
You are viewing a single comment's thread. Return to all comments →
No. For your example with k=6, if the input were [a0,a1,a2,a3] = [1,5,5,1], then both of the (5,1) (that is, (a1,a3) and (a2,a3)) count because in both cases i < j. (1 < 3 and 2 < 3)