Count Array Pairs Divisible by K at Qualcomm

Hard30.5% acceptance

This problem has 62.5% frequency at Qualcomm.

Problem Description

Given a **0-indexed** integer array `nums` of length `n` and an integer `k`, return _the**number of pairs**_ `(i, j)` _such that:_ * `0 <= i < j <= n - 1` _and_ * `nums[i] * nums[j]` _is divisible by_ `k`.

Read full problem and hints

Topics

Also asked at 1 company


More Qualcomm Questions

View all Qualcomm questions