aboutsummaryrefslogtreecommitdiff
path: root/challenge-276/eric-cheung/python/ch-1.py
blob: abb3112347ba22c03ef86c3bdc80fc70c3ee341c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
from itertools import combinations

## arrHours = [12, 12, 30, 24, 24]  ## Example 1
## arrHours = [72, 48, 24, 5]  ## Example 2
arrHours = [12, 18, 24]  ## Example 3

arrComb = combinations(arrHours, 2)

arrOutput = [arrLoop for arrLoop in list(arrComb) if sum(arrLoop) % 24 == 0]

print (len(arrOutput))