Computer Science, asked by iskeerthana94, 7 months ago

The Necklace Problem
Problem Description
You are going to make a necklace of N beads using K different colored beads.
There are unlimited beads of each color,
You need to find the expected value of number of distinct colors used, if every necklace is equiprobable to be made.
Two necklaces are considered same if after some rotations they are identical.
You need to find this value for each N from 1 to M, modulo 10°+7.
Problem Constraints
• 1 SM, Ks 105
Input Format
The line of argument contains 2 integers M and K, in this order.
Output Format
Return a vector of integers of size M, where the ith element represents the expected value of distinct colors for a necklace of i beads modulo 10^9+7.​

Answers

Answered by bhushan5248
0

Answer:

sorry l don't know the answer

Explanation:

also increases the point

Similar questions