#P8840. Report Score Calculation
Report Score Calculation
Report Score Calculation
At Hamster Technology University, the final assessment for the Computer Organization Principles experiment is to submit a report. Each report has a base score, (a). In addition to the base score, the following rules are applied based on the number of pages (p) in the report:
- If the report contains fewer than 16 pages, 10 points are deducted. (If the deduction makes the score negative, the final score is recorded as 0.)
- If the report contains more than 20 pages, for every extra page (i.e. for each page above 20), 1 point is deducted until the score drops to 0.
If the number of pages is between 16 and 20 (inclusive), no additional deductions are applied.
You are given two integers (a) and (p), where (1 \leq a \leq 100) and (1 \leq p \leq 50). Calculate the final score of the report.
inputFormat
The input consists of two space-separated integers: the base score (a) and the number of pages (p).
outputFormat
Output a single integer representing the final score of the report after applying the deductions.
sample
50 15
40