Tap here to switch tabs
Problem
Submissions

Problem: Count Pairs That Form a Complete Day II

Try to solve the Count Pairs That Form a Complete Day II problem.

Statement

Given an integer array hours representing durations in hours, determine the number of index pairs (i,j)(i, j) such that i<ji < j and hours[i] + hours[j] forms a complete day.

A complete day is defined as any duration of time that is an exact integer multiple of 2424 hours.

Constraints:

  • 1≤1 \leq hours.length ≤5imes105\leq 5 imes 10^5

  • 1≤1 \leq hours[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Pairs That Form a Complete Day II

Try to solve the Count Pairs That Form a Complete Day II problem.

Statement

Given an integer array hours representing durations in hours, determine the number of index pairs (i,j)(i, j) such that i<ji < j and hours[i] + hours[j] forms a complete day.

A complete day is defined as any duration of time that is an exact integer multiple of 2424 hours.

Constraints:

  • 1≤1 \leq hours.length ≤5imes105\leq 5 imes 10^5

  • 1≤1 \leq hours[i] ≤109\leq 10^9