Loading...
Budgeting for MU Clubs
Time: 1 s
Memory: 250 MB
Metropolitan University is proud of its active student community, which includes N student clubs dedicated to organizing various events and activities. The university contributes a total budget of T Taka to support these clubs, emphasizing the importance of inspiring a wide range of extracurricular activities.

The university believes in fair distribution and plans to allocate the budget among the clubs based on their membership sizes. The bigger the club, the larger its budget to ensure an equitable representation of the student community at supported events.

Metropolitan University is looking for your help in developing a program to calculate the budget allocation for student clubs, with an emphasis on ensuring that larger clubs receive a proportionally larger share of the budget.
Input
An integer N (1 <= <= 10), representing the number of clubs.
An array arr of N integers representing the membership sizes of each club (1 <= arr[i] <= 100);
An integer T (1 <= T <= 10000) the total budget (in Taka).
Output
Print N lines of the form "Budget for Club X: Y Taka", where X is the club number (ranging from 1 to N) and Y is the budget allocated to that specific club. The budget should be rounded down to the nearest integer.
Examples
Input
Output
3
30 20 50
5000
Budget for Club 1: 1500 Taka
Budget for Club 2: 1000 Taka
Budget for Club 3: 2500 Taka
Input
Output
3
28 87 42
3035
Budget for Club 1: 541 Taka
Budget for Club 2: 1681 Taka
Budget for Club 3: 811 Taka
Problem Info
Problem ID 225
Time Limit 1000 ms
Memory Limit 256000 KB
Moderators Rafee , Alom_Shanto
Statistics
Submit
You need to Login or Registration for submit your solution