Лимит времени 4000/7000/7000/7000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Prepared by Ibrahim Mesecan.
Сложность Бета
Mr. Dardani gives weekly allowance to his son Arben. But in order to encourage Arben
to study more, Mr. Dardani has some rules. He gives the money according to the following system.
Weekly, Mr. Dardani gives a minimum of 600 leke and maximum of 1500leke. And, the calculation
starts after Arben complies the minimum requirements for a week. He has to fulfill
the following minimum limits to get the minimum allowance:
- 60 pages of book
- 50 questions
- 25 new English words
If Arben cannot fulfill any of the above limits, he gets zero leke for that week. If Arben fulfills all the limits,
for every extra:
- Page read in that week is 4 leke
- Question solved is 6 leke
- Word memorized is 6 leke
If his sum exceeds the weekly max allowance, Arben can get 1500 leke for that week.
Write a program that reads monthly data for his son and calculates the amount of money Arben got for that month.
Input specification
You will be given 4 lines of data. In every line, there will be 3 integer numbers:
numPages, numQuestions, and numWords.
Output specification
Show one integer number that Arben has taken in that month.
|
Sample Input I:
70 70 30
50 80 100
60 50 25
150 150 150
|
Sample Output I:
2890
|
|
Sample Input II:
69 179 58
153 131 41
164 183 30
91 41 55
|
Sample Output II:
4500
|
|
Output Explanation :
Week Nr. |
Amount Taken |
Explanation |
1 |
790 |
|
2 |
0 |
He couldn't fulfill limits |
3 |
600 |
He is at the limits |
4 |
1500 |
He exceeded the limits |
Для отправки решений необходимо выполнить вход.
|