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)(x, y) George can go to (x+1,y)(x+1, y), (x1,y)(x-1, y),(x,y+1) (x, y+1), or (x,y1)(x, y-1).

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

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

Explicit Examples

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

Problem Loading...

Note Loading...

Set Loading...