Ad
  • Custom User Avatar

    Had the same problem. I figured out that it was due to having excess spaces between the answer. Used return str.trim(), and the error was gone.

  • Default User Avatar

    My bad, I shouldve read the specifications before making the comment lol

  • Custom User Avatar

    Good Point. However, the specification states the function will only be passed two square matrices (N x N).

  • Default User Avatar

    In your second for loop you shouldnt have also used n, what if the matrices arent square?

  • Default User Avatar

    Expected: equal to 60212 146017 50473 160148 63092 42537 147424 139514 411638 406581 416904 284633 312489 495225 206947 233992 439822 178485 390984 398994
    Actual: 60212 146017 50473 160148 63092 42537 147424 139514 411638 406581 416904 284633 312489 495225 206947 233992 439822 178485 390984 398994
    Why isnt this working? My code works for all test cases except random