Given a list of song durations, find the number of unique pairs of songs whose duration sums up to multiple of 60 seconds.

Example 1:
Input: [10, 20, 40, 140]
Output: 2
Valid song pairs are: (20, 40) & (40, 140)

Example 2:
Input: [30, 30]
Output: 1
Valid song pairs are: (30, 30)

Example 3:
Input: [60, 120, 180]
Output: 3
Valid song pairs are: (60, 120) & (60, 180) & (120, 180)

Comments (2)