The bull's-eye has radius 10 and each successive ring increases the radius by 5. The bull's-eye scores 9 and each successive ring scores 2 less. Missing the target scores 0. Assume that impacts on a boundary line between two rings score the lower of the two scores. The number on the first line is the center point and the number on the second line is the impact point.
Output is the score.
The score is 7. The score is 0. The following sequence of positive integers is generated by a rule which tells how each number is determined from the previous number. The rule is not obvious and will be explained below. Read the current number as a string of digits from left to right.