JS Programming / Cow-milk Allotment

সমস্যা
এক লোকের ৪৯টি গরু আছে। ১ম গরু দেয় ১ কেজি দুধ, ২য় গরু ২ কেজি,.. এভাবে ৪৯তম গরু দেয় ৪৯ কেজি দুধ। তার ৭টি ছেলে আছে। তার মৃত্যুর পর ৪৯ টি গরু ৭ জনের মধ্যে এমনভাবে ভাগ করতে হবে যেন সবাই সমান সংখ্যক গরু পায় এবং প্রত্যেকের মোট দুধের পরিমাণও সমান থাকে।
(এই সমস্যা যেকোন সংখ্যক লোকের ক্ষেত্রেও সমাধান করা যায়)

Problem
A man has 49 cows. The first cow gives 1 KG of milk, the second cow gives 2 KGs of milk, and in this way the 49th cow gives 49 KGs of milk. The man has 7 sons. After his death, the 49 cows have to be divided among his 7 sons in such a way that all of them will get the equal number of cows and everyones' amount of milk will be same.
(This problem can be solved for any number of sons.)

সমাধান প্যানেল দেখান


Input the number of the persons, between whom the cows and milk will be divided equally:




কোন ধরনের জাভাস্ক্রিপ্টের লাইব্রেরি ব্যবহার করা হয় নি
No third party Javascript libraries were used.