Page 1 of 1

1 2 3 4 1/4 Completed Question 4 Triplets count You are given the following: • An integer N Array A containing N positiv

Posted: Tue Jul 12, 2022 8:05 am
by answerhappygod
1 2 3 4 1 4 Completed Question 4 Triplets Count You Are Given The Following An Integer N Array A Containing N Positiv 1
1 2 3 4 1 4 Completed Question 4 Triplets Count You Are Given The Following An Integer N Array A Containing N Positiv 1 (183.06 KiB) Viewed 37 times
1 2 3 4 1/4 Completed Question 4 Triplets count You are given the following: • An integer N Array A containing N positive integers (1-based) • Positive integer B ● Task 27°C Cloudy For each integer u, such that 0 ≤u< B, determine the number of triplets (i, j, k) satisfying 1 ≤i<j<k≤N and A, + Aj + Ak when divided by B leaves u as remainder. Mathematically, (A; + Aj + Ak) mod B = u. Example Assumptions • T = 1 • N = 3 ● A = [1, 2, 3] Max. score: 50.00 • B = 4