[Community puzzle] Gravity Tumbler

This topic is about the puzzle Gravity Tumbler.

Feel free to send your feedback or ask some help here!

Just silly question, I’m surprised the number of rotations seem not to count on the examples, only the “space” matters, is it expected or I misunderstood the test cases ?

Shhh! You’re spoiling it for everybody! :scream:

Edited. :alien:

I’m sorry but I can’t find the first part of this puzzle. I can’t find anywhere in the easy community puzzles one called Gravity.
Thanks

Edit : I found it in medium puzzles : https://www.codingame.com/training/medium/gravity

Hello!

I think there is a missing information in the description of the test.
The test says that the # at the bottom.

In the second test, the count is even (2) and it seems the program wait for me to stack # to the right.
It’s not a problem, I can do it but it is not asked by the description :slight_smile:

Failure
Found:
...##...###..#...

Expected:
...........######

It stacks at the bottom at each iteration, but since it tumbles, it should be no surprise that some of it could stack on the sides as well! :smiley:

The description seems correct to me.

Oh! Ok thanks.
This part induce me in error:

If count is odd: width lines of height characters where the # are at the bottom.
If count is even: height lines of width characters.

Sorry!

1 Like

Oh, I see what you mean about the misleadingness there.
Thanks for notifying, lemme fix that right away.

1 Like

Extend it to count=0 in the problem statement would need to add a new condition in the code. It could have been funny to need this to get 100%

IIRC that was deliberate. Don’t remember why, though.

Hey, I got stuck on validation test named JBM, it seems I didn’t understand the puzzle instructions, the next test helped me to find the problem, Good luck all.

Input:

    17 5
    1
    .................
    .................
    .....##..........
    .................
    ......#..........

Output:

.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
....#
...##
1 Like

Now you’re past it, would you mind sharing what wasn’t so clear about the puzzle instructions, so we can make them better for the next contestant?

I think you should mention on which direction the gravity works.

for even number , gravity pull to right ->
for odd number, gravity pull down | and right ->
                                  V

For next input:

    17 5
    1
    .................
    .................
    .....##..........
    .................
    ......#..........

one can understand the next outcome:

.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
.....
..#..
..#.#

and either for next input:

    17 5
    2
    .................
    .................
    .....##..........
    .................
    ......#..........

One can understand:

    .................
    .................
    .................
    ......#..........
    .....##..........

For the last example I personally understood from the test examples that the gravity pulling to the right.

That’s so removed from the way you’re even supposed to think about this it’s making me dizzy.

Gravity works down. Always.

Are people attempting this before they tried the previous Gravity puzzle?!

Well, my solution pass every test in the IDE and none of the validators… Can someone confirm that the validators are correct / send one example of input from the validators ? I really don’t see what I did wrong here.

Python and Python3 final output is buggy has some additional character. I was unable to print correctly any kind of my output. An analysing script is receiving modified value.

I checked the line endings, and indeed they were inconsistent, but they were the same between test and validator so there should be no big surprise there.

I’ve updated them all anyway, so if you think that was your problem you might want to give it a new try. I doubt it, though. Do let us know! :slight_smile:

Hey JBM could you (or someone else) please help me , i pass all tests but when submitting the last (JBM) test fails i don’t know why

Bonjour,
j’ai un échec au test.

Échec

Trouvé :
…#
Attendu :
…#

Est-il possible de rencontrer des problème d’encodage? Est-ce que les tests sont corrects?

Cordialement,

Billy