Ad
  • Custom User Avatar

    There is a bug in your code because I proved it in a totally different language.

    @jahironr Please don't spread such foolishness...

    There is no error in your code. Error is in test function which generates floats.
    As andreydenisov said, you can "correct" your code by converting inputs to integers or you can use integer division \\ instead of classic division \.

  • Custom User Avatar

    Theres a bug in your code, because I proved it in Javascript and had an error. Expected: 60, Got: 80.53.

  • Custom User Avatar

    Try adding

    n = int(n)
    m = int(m)
    

    in the beginning of your function. Solved the problem for me.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution