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.
Nice! Very clean! Great job.
So, I am looking at this problem... It seems like a very nice little problem.
The first ribbon can be placed either horizontally or vertically?
All of the examples seem to be in order. I'm assuming any one of the ribbons could be placed first, followed by zero or more other ribbons in any order, each additional ribbon being placed in the opposite direction of the previous, correct?
Did you make this problem up, myjinxin2015, or is there some other source?
Thanks for all the nice problems you have created on here!
My solution seems to be failing with the test ouptut saying that 450010 should be -1.
I agree, 450010 should output -1. If I simply copy my function definition into Python interpreter and invoke it with 450010, it outputs -1.
If I simply add a new test to the example tests for input 450010 and expected answer -1, then run the example tests, they all pass.
So, I can't figure out why my function fails that test - seems to me like it gives expected result?
Any ideas?