Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7824459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:36:16+00:00 2026-06-02T08:36:16+00:00

There is a challenge from CodeEval, called Grid Walk. Programming language doesn’t really matter.

  • 0

There is a challenge from CodeEval, called Grid Walk.

Programming language doesn’t really matter.

I’ve tried to crack it down, and I thought I did, as the answers my program gave me to smaller numbers (9 and 10) were correct according to an on-paper drawing.

As my program says, the final result should be 111005, but CodeEval doesn’t seem to agree with that.

Can anyone point me to the right direction?
What is the correct answer? A hint?

The challenge:

There is a monkey which can walk around on a planar grid. The monkey
can move one space at a time left, right, up or down. That is, from
(x, y) the monkey can go to (x+1, y), (x-1, y), (x, y+1), and (x,
y-1). Points where the sum of the digits of the absolute value of the
x coordinate plus the sum of the digits of the absolute value of the y
coordinate are lesser than or equal to 19 are accessible to the
monkey. For example, the point (59, 79) is inaccessible because 5 + 9
+ 7 + 9 = 30, which is greater than 19. Another example: the point (-5, -7) is accessible because abs(-5) + abs(-7) = 5 + 7 = 12, which
is less than 19. How many points can the monkey access if it starts at
(0, 0), including (0, 0) itself?

And a picture of where my program thinks the monkey can walk (green areas),
going from -298 to 298 in both X and Y axis, (0,0) being the center.

NotSolution

UPDATE:

I have the solution now. As I was building the points through the axis, I demanded that the previous y or the previous x were good, so this made me lose all the extra unreachable locations, leaving me with this, the right amount: 102485

Solution

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T08:36:18+00:00Added an answer on June 2, 2026 at 8:36 am

    Perform a flood-fill from (0,0) on the shape you’ve found, and you get all the points accessible from (0,0).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a little challenge here for you all, there is the data: CREATE
Is there any website which provides core java based programming challenges that tests programming
There seem to be very different opinions about using transactions for reading from a
There's always skepticism from non-programmers when honest developers learn the techniques of black hat
I have this new challenge to load ~100M rows from an Oracle database and
I am facing a challenge in my project. There are two text box's in
Hey there, I'm pretty new to programming and I've got a problem with the
So I'm starting to get a feel for what sets functional programming apart from
I have a similar challenge to this post: Batch insert/update with entity framework from
Last night I was trying to solve challenge #15 from Project Euler : Starting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.