Problem 719

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you
are requested to be thoughtful in not posting anything
that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
scienalc
Posts: 2
Joined: Mon Aug 12, 2019 1:00 pm

Problem 719

Post by scienalc »

My algorithm found 7 S-Numbers lesser or equal than 10000 with a sum of 31233. The given sum is 41333, however.

Just to make clear I understood the problem statement, please confirm or correct the following statements:
  • only addition is allowed, i.e. one can't subtract or similar
  • the order of the digits must me observed, i.e. it is not allowed to convert 6724 to 62 + 7 + 4, for example
I also manually looked through the first 100 numbers and didn't find any that could meet the criteria.

These are the S-Numbers my algorithm found: 81, 1296, 2025, 3025, 6724, 8281, 9801. Which am I missing? (I don't consider them spoilers, as they don't reveal anything about the algorithm, but if they are, feel free to remove them)
Ted
Posts: 21
Joined: Sun Apr 02, 2006 10:46 pm

Re: Problem 719

Post by Ted »

You'll smack your forehead when you find the missing 10100. Just remember that zeros can be addends.
scienalc
Posts: 2
Joined: Mon Aug 12, 2019 1:00 pm

Re: Problem 719

Post by scienalc »

Ted wrote: Sat Sep 12, 2020 12:14 am You'll smack your forehead when you find the missing 10100. Just remember that zeros can be addends.
I did, I literally did. The error wasn't even in the core part of the algorithm, but in the part of code that determines the number of digits - it was off by one in those cases.
Post Reply