[Community Puzzle] Next growing number

https://www.codingame.com/training/easy/next-growing-number

Send your feedback or ask for help here!

Created by @kayou,validated by @anon63385508,@PhOeNyX and @alze.
If you have any issues, feel free to ping them.

No constraints? How big can n get?

When I approved it, it was n < 10^18.

The constraints section appears empty. And looking at the discussion of the contribution it’s missing for a while if it was ever properly filled
image

I edited to add n < 10^19 in constraints.
I also noticed that the provided solution is a bit overcomplicated but as long as it works…

2 Likes

My recommendation to approvers, especially if you would be the 3rd and final one to approve:
If there is an unanswered comment/question/concern at the contribution, pls postpone your approval. Even if the concern is a minor one. The goal of the whole review process is to prevent any problems in contribution hit the public.

6 Likes

If it’s minor, you can edit it by yourself and tell what you’ve done in your approval comment.

1 Like

I could have edited too (and did so a few times in the past, mostly removing whitespaces that make input parsing crash for some languages).
But this time I opted to complain about the review process. The contribution discussion has 2 different users pointing out that the constraints are missing, yet it got approved. I see the constraints as a relevant part of the statement to decide if I want to bruteforce it or do something more clever.

3 Likes

Along with your point, there were also a half dozen users (myself included) that thought this should/could be a Clash, not an IN/OUT. Admittedly I had seen this one before but I solved this today in just a few minutes in a dozen lines. I think if you can write the code to solve the first test and that gets you through the remainder of the tests (and all validators), that’s not an IN/OUT, even an easy one.

1 Like

Most likely, I have a minority opinion here, but I do like to see some easy puzzles hitting the practice pool. Not everyone likes the time pressure and the competitive nature of a CoC, so for beginners it is good to have more easy puzzles. CG can and shall serve multiple audiences. You can always skip the easy puzzles, if you want only the more challenging ones.

True, this one was on the easier side even among the ‘easy pool’. But it did require some consideration to get your ‘dozen lines’ right :slight_smile:

5 Likes

I have a problem to pass the validator 4. Is it possible to have information on this one?
However, I pass my test sets 100%! And by submitting 80% …
A case escapes me!

We totally agree ? 0-> 1, 1-> 2 … 9-> 11?

Thank you.

Yes we totally agree.

I give you a similar one:

226789

1 Like

Oh thank you very much! This allowed me to complete the puzzle with 100% success! :slight_smile:

But how do you know the test cases behind the validators?

When you solve enough puzzles you can go to the contribution page, where you can see the validators, edit the puzzle if a problem is reported, etc.
It works only for puzzles made by users.

1 Like

I can’t do more than 80% ! I think the problem is with the numbers ending in 9

There’s a missing test case. Either include single-digit numbers (1-8 in one test case and 9 as separate edge case) or make 10 a minimum constraint. At least one Python3 solution (with multiple upvotes) fails on single-digit input.

Also, I’d suggest making the maximum input at least 1E20 if the goal is to find the answer without numeric conversion, since 1E19 fits in an unsigned 64-bit integer.

Hi, after submit, I can’t pass the Validator 2.
I tried with many custom input, but I couldn’t came up with one, that would make my solution fail.
Is it a negative or floating number? (I didn’t handled these, because from the description, I didn’t felt I need to)
Could I get a similar value for this one?
Thanks in advance!

Try 299. It’s not the validator but very similar.

2 Likes

Oh… I guess not 222 is the next growing one. : D
Thank you very much!

222>299? Are you sure? :wink: