Number of cells in multiplication table containing X

Problem Given integers N and X, write a function that returns the number of times X appears as a value in an N by N multiplication table. Suppose you have a multiplication table that is N by N. That is, a 2D array where the value at the i-th row and j-th column is (i + 1) * (j + 1) (if 0-indexed) or i * j (if 1-indexed). ...

This site uses cookies to improve your experience on our website. By using and continuing to navigate this website, you accept this. Privacy Policy