Problem 637

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
vamsikal3
Posts: 55
Joined: Sat Oct 01, 2016 8:25 am

Problem 637

Post by vamsikal3 » Sun Sep 23, 2018 6:00 am

Just want to check my understanding of the problem. Given n = 99999 (base 10), then (assuming this is the shortest path)

99999 (base 10) -> (9 + 9 + 9 + 9 + 9) (base 10) = 45 (base 10) -> (4 + 5) (base 10) = 9 (base 10).

So, f(99999, 10) = 2. Am I correct?
my friend key --> 990813_OZPwQtCjkD6KlvxirOoTSZxccMFsuw1L
Image

thomas_schmidt
Posts: 1
Joined: Mon Sep 24, 2018 2:40 pm

Re: Problem 637

Post by thomas_schmidt » Mon Sep 24, 2018 2:41 pm

Yes, you are correct!
Trying to learn some Mathematics and Scala.
My friend key: 1379851_StEZDaDCBWMjKjW1THPYSY5LIlpqsaZQ
Image

Cot-O-Bus
Posts: 1
Joined: Thu Sep 27, 2018 9:18 am

Re: Problem 637

Post by Cot-O-Bus » Thu Sep 27, 2018 9:31 am

Correct sequence, should looks like:

Code: Select all

 
99999=>
1. 9999+9=10008=>
  2. 1+8 => 9
and f(99999,10)=2
Last edited by Cot-O-Bus on Mon Oct 01, 2018 6:07 pm, edited 3 times in total.

DJohn
Posts: 42
Joined: Sat Oct 11, 2008 11:24 am

Re: Problem 637

Post by DJohn » Thu Sep 27, 2018 9:52 am

I don't understand where you think the problem is. No one has made any claims about f(10211914,10), and the problem statement does not give any algorithm.

With

Code: Select all

1. 1+0+2+1+1+91+4 = 100 => 
                           2. 1+0+0 = 1
you've shown that f(10211914,10) <= 2. But then where do you get
10211914 -9*floor(10211914/9) = 1
There's no mention of division or multiplication. You can only split the base-B representation of a number into chunks, and add those chunks together.

Post Reply