HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Functions > problem:


076. 50289 - Monthly Allowance

Guest
• Discussion of problem (2)

Volume problems

• 040. 50354 - Intersecting Rectangles
• 050. 50510 - What floor are they?
• 050. 50566 - Grade Point Average (...
• 060. 50727 - Fibonacci Numbers
• 061. 50733 - The Highest Average
• 062. 50390 - Total Salary Paid
• 066. 50523 - Total Tax to Pay
• 070. 50534 - Top Trading Company
• 076. 50289 - Monthly Allowance
• 080. 50347 - Selling Oranges
• 090. 50378 - Sum of the given digits
• 095. 50453 - The Cubic Difference
• 100. 50397 - The Number of Points ...
• 110. 50409 - Random Password Ge...
• 120. 50684 - Sum of prime numbers...
• 125. 50578 - Mersenne prime
• 130. 50652 - Prime Factorization

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 4000/7000/7000/7000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan. Difficulty Beta

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


Для отправки решений необходимо выполнить вход.

www.contester.ru