[Community Puzzle] Brick in the Wall

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

Feature request: add a link to the puzzle.

That evil extra whitespace made my program crash :angry:

1 Like

Lol. Same comment as what I said last time.

Ironically, the previous version of the bot did do that, so not sure how it came to be lost in portage.

in php,
the first loop return the same weight for all bricks…


for this problem with PHP replace these lines:

for ($i = 0; $i < $N; $i++)
fscanf(STDIN, “%d”, $m );


$m=fgets(STDIN, 1024 );

Good luck :wink:

oups sorry :-/

$m=fgets(STDIN, 4096 );

4096 for the big wall :wink:

1 Like


So for the last test, how the heck did I get a better score than the one we should find (233041.170 vs 233041.250) ? The other tests are good, but with this failure I also miss one validator (it’s linked I guess).

Thx for any clue.

I am having that problem too. On the “Tall” validator, I get 7401.548 instead of 7401.550 and on the last, “A real wall”, I get 233041.200 instead of 233041.250… When submitting, I pass all the tests except the last one.

@Eldoir Considering your results, maybe some floating point inaccuracies?.. If you think about it, the result always is 0.65 times an integer so that most of the computation can be done accurately with integers.

1 Like

You’re right! I even released g from the multiplication to compute it only at the end.
I am disappointed to have missed the real interest of the exercise.
Now I pass all the validators but not the last test. Always 233041.200 instead of 233041.250.
But anyway! I got my 100%. :slight_smile:

i am having the same problem, and i don’t know how to resovle it, any more help please

@Eldoir Use double, not float (I’ve just checked your published C# code).
@AchrafLy Same problem, maybe?..

1 Like

Thanks @Niako but with doubles instead of floats I still don’t pass the last test, and worse, I don’t pass the last validator either!

@Eldoir Are you sure you did not forget to remove the f from 0.065f then?

Oh, well. That was it :smiley: Thanks!

Not sure if this is happening to anyone else, but after I’ve successfully passed all the testcases, I hit submit and am stuck on the Loading… Computing score page. Validator broken?

most probably a temporary issue. You can submit again to get your score.

It worked. Thanks!

I passed the third test “Fibonacci bricks + 1” but not the validator in relation with (by the way, the validator is named “Fibonacci bricks + 2”).
I passed all the other tests and validators. What is the problem ?