Deliv-e-droid
Time limit1sMemory limit1024 MB
Compute the final score from the number of packages delivered and obstacle collisions, using the 50-point reward, 10-point penalty, and 500-point bonus rules.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Statement
In the game Deliv-e-droid, a robot droid must deliver packages while avoiding obstacles. When the game ends, the final score is calculated with these rules:
- Gain points for every package delivered.
- Lose points for every collision with an obstacle.
- Earn a point bonus if the number of packages delivered is greater than the number of collisions with obstacles.
Determine the final score at the end of a game.
Input
The first line contains a non-negative integer , the number of packages delivered. The second line contains a non-negative integer , the number of collisions with obstacles.
Output
Print a single integer , the final score.