Refactor range bounds
Refactor range bounds

Use a common method to find the midpoint to make the code terser.
Leverage implicit conversion from int to Range.

martincostello/adventofcode,martincostello/adventofcode,martincostello/adventofcode,martincostello/adventofcode