[Community puzzle] The max surface box


#21

I think I need a hint for how to get started. I mean, I know I need to find min and max for 2ab+2bc+2ac where abc=N. Just not sure how to do it programmatically.


#23

Maybe try one of the easy training puzzles first?


#24

Thanks a lot ! It also OK for me.

Regards


#25

Holy s…t, my algo is passing all the tests (including the ones proposed here) except the 4th after submitting my code :confused:
Any hint someone ?


#26

Does this help? Anyway I PMed you the validator.


#27

Hello
This case didn’t help, my algo was validating all the test cases, including the ones proposed in the forum, except the 4th after submiting.
I now have 100% but realized that I had to tweak a little bit: I compute using 2 different algorithm, and choose the best of both (which is obviously a dirty solution) but I’m too lazy to investigate further :slight_smile:

Anyway thanks for the help !


#28

I was also passing all tests except the 4th until i code a probabilistic algorithm using random combinations of prime numbers from the decomposition of the input number and it worked perfectly xD


#29

I’m passing all tests, but only the first validator does not pass… Does anyone knows what the validators are?


#30

Yes, I do know them.


#31

Haha, that was a stupid mistake on my behalf… I forgot to check for low cubes numbers except 1. This is corrected now.


#32

tests: 100% submit: 16% …
now I got 87% but why is it so often the 1. test that I fail :frowning:


#33

No need to think too much about prime factors. Just need to find all factors in integers, of abc = N. Then check through all combinations for the max and min area. Brute force is still fast enough for this problem.


#34

The puzzle is nice from coding or math point of view. (Though not belonging to ‘hard’ category, especially because it is simply brute-forceable).

But have you ever tried to build a bigger block from ONLY 1x1x1 size LEGO blocks?? If you don’t have anything that holds the adjacent small blocks together, it will fall apart, so if using only 1x1x1 blocks, the ONLY solution that would pass a HARDWARE validator is 1x1xN… :slight_smile: