Computer Science, asked by beastverma5656, 9 months ago

You are given a set of N positive integers and another integer P, where P is a small prime. You need to write a program to count the number of subsets of size (cardinality) 3, the sum of whose elements is divisible by P. Since the number K of such sets can be huge, output K modulo 10007 1009 (the remainder when K is divided by 1009)
Constraints
N <= 500
P<50
All integers <=1000

Answers

Answered by ıtʑFᴇᴇʟɓᴇãᴛ
0

Tex

intrftm.

integral

another integer P, where P is a small prime. You need to write a program to count the number of subsets of size (cardinality) 3, the sum of whose elements is divisible by P. Since the number K of such sets can be huge, output K modulo 10007 1009 (the remainder when K is divided by 1009)

Constraints

N <= 500

P<50

All integers <=1000

Answered by Anonymous
1

Answer:

It can give the remainder to the promotion of the divisible elements.....

Similar questions