This comment is hidden because it contains spoiler information about the solution
this is beautiful
I don't understand this kata.
what does it mean "squares disposed in the same manner as in the drawing:" when applied to arbitrary numbers of squares? what are the rules for how these are placed, do we need to check that these squares can be arranged in any or some special way as a rectangle?
I mean I now see that maybe its supposed to be a sequence 1,1,2,3,5,8 etc but that's not clearly defined. you could make the same rectangle as shown in the image and swap the 1,1,2,3 with a 1,1,1,4 set of squares. The rectangle image has nothing to do with the specific ordering of those values, that's just one example which could form a 13 x 8 rectangle.
I think the diagram is just confusing, but I guess it must only be me that thinks this since nobody else asked
That's very kind of you Lucas. I only started learning python a few weeks ago and probably diving in too much to things when I don't have the real basics down without thinking about them. These katas are fun but usually I end up writing what I call "BASIC" brute force solutions using python, at least I sometimes have an idea "how" it should work, like this solution here I had made notes along those lines but whereas this person actually implemented it so cleanly I ended up with a big mess of code trying to handle specific cases
so seeing how you guys get on is kind of inspiring AND depressing at the same time :)
FINALLY! I wrote something that looks like the top listed answer here.
You are well on your way to being a great programmer. You don't lack an innate capability or intelligence if you got this far!
this just shows me I do not have what it takes to be a programmer.
OMG, I suck.
like every other kata mine ends up a big horrible clump of loops and conditions like its in basic
at least I used zfill for padding. :)
OMG what an amazing resource, thank you so much for sharing.
Also, great solution, which is what I had in my mind but when I wrote the code for it ended up a horrible mess which didn't work for all the test cases, so I skipped this one
I like this one a lot.
very good, I did an ugly brute force version of this, would have been nice if I'd known about the "center" method :)