HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Arithmetic > problem:


50289 - Monthly Allowance

Guest
• Discussion of problem (2)

Section problems

• 50369 - Base Conversion
• 50407 - Missing Number
• 50336 - Buying Carpets
• 50338 - Convert Into Decimal
• 50404 - Sum of Self Powers
• 50295 - Weighted Average
• 50343 - The number of Ending Zero...
• 50296 - Total Discount Rate
• 50289 - Monthly Allowance
• 50403 - Number of Chairs
• 50408 - Molecules
• 50481 - Car Parking
• 50413 - Valid Permutations
• 50412 - K numbers
• 50417 - Fun Fair
• 50433 - Sum of Cubes
• 50807 - Euro to Leke

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