Computer Science, asked by snehajm6815, 8 months ago


Distinct values
You are given an array A containing N elements. You do the following step repeatedly:
• Take any 2 elements and add the sum of their absolute difference back to the array.
Calculate the number of distinct possible values the array contains after an infinite number of steps modulo 10° + 7.
Function description
Complete the getPossible function in the provided editor. It contains the following parameters:
Parameters
Name
|
Type
Description
А
INTEGER
ARRAY
Values
|
Return
The function must return an INTEGER denoting the number of distinct possible values the array
contains after infinite steps modulo 10^9+7.
Constraints
15N S 10
1 <A[i< 10°
Input format for custom testing
• The first line contains an integer N denoting the number of elements in A.
^
each line i of N subsequent lines(where 0<=I<N) contains an integer describin

Answers

Answered by shanu9937
3

Answer:

click on the information then you'll see your full answer Mark as brainlist

Attachments:
Similar questions