Python Program for Find remainder of array multiplication divided by n
This article will learn to find the remainder of array multiplication divided by n using the python program.
Explanation:
Program
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # array arr = [11, 5, 4, 13, 7, 17] n = 3 # now we initialize the count variable count = 1 # now we iterate the arr for i in range(0, len(arr)): # add to count of remainder of array multiplication divided by n count = count* (arr[i]%n) # print the result print(count%n) |
Output
2