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.
You should explain what
n
is in the description. Also, the examples should be language-agnostic, if feasible.Yes, thanks. Minimal explanations are often more effective but im kinda nerd🤓
Hi Homogen,
You have a very nice idea here, but I think the description can be simplified to make it clearer.
Something like this:
The usual definition of matrix multiplication does not allow for division of matrices to be defined. In this kata we redefine matrix multiplication so that division of matrices can be unambiguously defined.
Given two square matrices of size n called A and B, define their product C by
Example:
The order of the product matters:
Then, given the product matrix C and one of the factors, we can recover the other factor, as long as we know whether the factor that we are given is the left one A or the right one B.
Task:
Implement a function
matrix_div
with 3 parameters:result
represents the product matrix Cfactor
represents one of the two factors (either A or B).position
is either 0 or 1: 0 means that factor is the right factor while 1 means it's the left one.Return the other factor.
Examples:
Note: 1<=n<=30. All matrix elements lie between 1 and 100 inclusive. Division of elements is integer division.
haha thanks, it was very concise and clear
This comment is hidden because it contains spoiler information about the solution
I apologize for my insufficient knowledge of the Codewars documentation, but I don’t understand how to take advantage of this mistake, and much less how to fix it
Python: Random tests are vulnerable to input modification
Thanks i am changed a few things
Write if you still have something to add
I think that properly used KaTeX and math markup could make description a bit clearer. The monospaced block looks weird.
;-)
I am so sorry mr Voile but i am still still waiting and i hope im not distracting you from something very important
Sorry but i am still waiting
Done, it turns out that I wrote the very first paragraph in vain
The sum of what? How should we interpret the numbers in
? It takes a lot of squinting to decipher how these values come up (they're the individual terms of the matrix multiplication).
Overall it is now barely decipherable, but still very unclear.
Loading more items...