[Community Puzzle] Are The Clumps Normal

https://www.codingame.com/training/easy/are-the-clumps-normal

Send your feedback or ask for help here!

Created by @MattZ,validated by @JBM,@b0n5a1 and @Niako.
If you have any issues, feel free to ping them.

1 Like

@MattZ

Only issue I had with this puzzle was that the default code parsed the input into a long, not compatible with the bigger test cases.

Had fun nonetheless

@Molybdene Fixed, thanks.

still cannot figure out what the problem means… can somebody do more explain about this?
N = 157285
B = 2
it said “split up the digits of N into a minimum number of clumps such that all of the digits D in each clump are modularly congruent in base B”, then the example split N into this:
clumps = [157, 28, 5]
D % B = [1, 0, 1]
but how? why 157285 should be splitted into these clumps , but not like this:
clumps = [1, 572, 85]?
D % B = [1, 0, 1]

There’s a lot of mathematical vocabulary for a relatively simple thing…
It’s all about the result of the modulo:

  • 1%2=5%2=7%2=1, first clump.
  • 2%2=8%2=0, second clump.
  • 5%2=1, last clump.

That’s all… :wink:

Edit: Erf typed too fast, corrected. Thx @Djoums

10 Likes

Your first line should be =1 and the second =0, otherwise it’s even more confusing :wink:

1 Like

that’s clear and simple example for me , and finally I totally understand what it means, thanks!!

I passed all the validators, but not two of the test cases, 5 and 7.
Never happened to me before, can’t figure out why.

@MattZ,@JBM,@b0n5a1,@Niako

It would be helpful if you’ll add @anon72424297 explanation in the statement example

next to

Thanks @anon72424297, I didn’t understand it without your explanation

3 Likes

Once I understood this, it was a good programming challenge, but I found the description to not be clear enough for me to understand. I had to look at the discussion section for more explanation.

1 Like