Will my code be with in the limits of the contrainsts?

And what are the constraints on n and the time limit?

THOSE I HAVE MENTIONED IN THE ARTICLE

No need for the caps and fyi, you have stated the question wrong.
It is clearly written in the explanation that the power of each node is \Sigma{D[A[j]]*C(i, A[j])} rather than D[A[i]) * C(i,A[j]) which completely changes the question

Am really sorry

I AM HAVING TEST TODAY. CAN YOU PLEASE SEND ALL THE QUESTIONS PICS AT sinhamn@rknec.edu

please bro