Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
A solid math/coding exercise. Very satisfying.
Seconding this.
Decently challenging - had to learn some new Python features to do it. Very satisfying in the end.
Would recommend fixing description as per rge123's suggestions.
Like a few other kata I've seen, this is as much a math problem as a coding one. Unlike those, the math problem here is complicated and hard - the square pizza algorithm requires factoring n, which gets much harder as n increases. In combination with the large test numbers and the runtime limit, it becomes a "how many optimization tricks do you know" problem more than a math problem.
As-is, this is more difficult than I think it really needs to be. Depending on the difficulty level you're aiming for, I would recommend either:
Additonal suggestions:
Solid exercise with an elegant solution. Very satisfying.
Very satisfying. (You're lucky I like ham and cheese on my pizza.)
Interesting & practical exercise. Copying the turkish words from the description into the program was a bit cumbersome, but I can't think of a way around that issue that doesn't (a) pigeonhole users into one kind of solution or (b) change the turkish language to have sensible letters.
You're very welcome! I'm glad to hear my compulsive documentation habit is helpful.
Very satisfying exercise. Requires some thought / knowledge of numpy, but leads to an elegant solution.
A nice little math problem, with an elegant solution. It did strike me as more of a math problem than a coding one - in the sense that once I figured out what the math was, the code was very simple - but maybe that works for 7 kyu. Very satisfied.
This is the kind of code we all want to maintain.