# [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
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

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

#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ā¦