Ad
  • Default User Avatar

    Nice! Very clean! Great job.

  • Default User Avatar

    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!

  • Default User Avatar

    Same here. This is very strange. I have the same problem too.

  • Custom User Avatar

    I'm having the same problem. Have you found any solution?

  • Default User Avatar

    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?