All prompts are owned by LeetCode. To view the prompt, click the title link above.
Completed during Weekly Contest 402 (q1)
First completed : July 07, 2024
Last updated : July 07, 2024
Related Topics : Array, Hash Table, Counting
Acceptance Rate : 79.32 %
class Solution:
def countCompleteDayPairs(self, hours: List[int]) -> int:
counter = 0
for i in range(0, len(hours) - 1) :
for j in range(i + 1, len(hours)) :
if (hours[i] + hours[j]) % 24 == 0 :
counter += 1
return counter