As a young man, Al was a skilled artist, a potter with a wife and two fine sons. One night, his older son developed a severe stomachache. Thinking it was only some common intestinal isorder, neither Al nor his wife took the condition very seriously. But the boy died suddenly that night.
Knowing the death could have been avoided if he had only realized the seriousness of the situation, he always felt he was guilty. To make matters worse, his wife left him a short time later, leaving him alone with his six-year-old younger son. The hurt and pain of the two situations were more than Al could stand, and he turned to alcohol for help. In time Al became an alcoholic.
As the alcoholism progressed, AL began to lose everything he possessed – his land, house, etc. Finally Al died alone in a small bar. Hearing of Al’s death, I thought, “What a totally wasted life! What a complete failure! ”
As time went by, I began to revalue my earlier rough judgement. I knew Al’s now adult son, Ernie. He is one of the kindest, most caring, most loving men I have ever known. I saw the love between Ernie and his children, thinking that kindness and caring had to come from somewhere.
I hadn’t heard Ernie talked much about his father. One day, I worked up my courage to ask him what on earth his father had done so that he became such a special person. Ernie said quietly, “As a child until I left home at 18”, Al came into my room every night, gave me a kiss and said, “love you, son.”
Tears came to my eyes as I realized what I had been a fool to judge Al as a failure. He had not left any material possessions behind. But he had been a kind loving father, and left behind his best love.
wuyiqi trapped in a maze again. He want to escape from the maze. He face a problem:
put k1 + k2 + ... + kN different balls into N different boxes, the first box must contain k1 balls, the second box must contain k2 balls, and so on. What is the number of division modulo P (P is a prime.)..
This problem is too easy. wuyiqi can solve it very fast.
But wuyiqi can not escape from the maze, he must solve a hard problem.
Now there is the problem:
Given the N and P as mentioned above.
wuyiqi should gives the {k1, k2, ...kN }make the above problem’s answer is zero.
And restriction conditions are 0 ≤ k1 ≤ K1, 0 ≤ k2 ≤ K2, ..., 0 ≤ kN ≤ KN , of course they are all integers, and at least one of which is not zero.
wuyiqi want you to calculate how many {k1, k2, ...kN } meet the conditions.