We are told in the problem statement that N always contains a 4, so you do
not actually have to worry about one of your numbers in the constructive
solution ending up as a 0. A number with only one non-zero digit is also
not a concern, since this would result in 4000...0 = 2000...0 + 2000...0
and the problem does not prohibit A and B being the same. And it doesn't
really matter what the start digit is. I implemented exactly this solution
during the round. I eliminated leading zeroes from my result, but a
question asked during the round confirmed that not doing so was not
considered wrong.

On Sun, Apr 7, 2019 at 9:27 AM Ralph Furmaniak <
[email protected]> wrote:

> Thanks for the problems! All were unique and clever and interesting, and
> I’m looking forward to the rest of the rounds.
>
> One issue with the solution to the first problem in the analysis: The
> constructive solution can result in 0s, eg: 10 would be decomposed as 10+0
> but the problem statement says that A and B must be positive integers.
> There’s a bit of casework needed to make the solution always output
> positive integers (number contains a 4, number has at least two non-zero
> digits, number starts with a 1, 5, or anything else)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/35469938-e6f8-4416-8dd9-5faa583f6a0f%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAMAzhzg%2BzSQsTFvx2bA%2B_jzGaMuHzf1nF0u%2BgPhw8LCRZgM6uw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to