Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.05 KB

_3184. Count Pairs That Form a Complete Day I.md

File metadata and controls

40 lines (27 loc) · 1.05 KB

All prompts are owned by LeetCode. To view the prompt, click the title link above.

Completed during Weekly Contest 402 (q1)

Back to top


First completed : July 07, 2024

Last updated : July 07, 2024


Related Topics : Array, Hash Table, Counting

Acceptance Rate : 79.32 %


Solutions

Python

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