# Curious George's Adventures On The Coordinate Plane

Curious George plays around on a planar grid. George can move one space at a time: left, right, up or down.

That is, from $$(x, y)$$ George can go to $$(x+1, y)$$, $$(x-1, y)$$,$$(x, y+1)$$, or $$(x, y-1)$$.

George can access any point $$(x,y)$$ where the sum of the digits of $$|x|$$ $$+$$ the sum of the digits of $$|y|$$ is $$\leq 19$$.

How many points can George access if he starts at $$(0,0)$$ including $$(0,0)$$ itself?

Explicit Examples

• $$(59, 79)$$ is inaccessible because $$5 + 9 + 7 + 9 = 30$$, and $$30 > 19$$
• $$(-5, -7)$$ is accessible because $$|-5| + |-7| = 12 \leq 19$$
• $$(190,90)$$ is not reachable, considering its neighbors are all not reachable.
×