Sort by

recency

|

177 Discussions

|

  • + 0 comments

    In JavaScript, change these lines from "parseInt" to "toString" in main function or some test cases with big integers won't work (when you start coding, use BigInt() too):

    const n = (firstMultipleInput[0]).toString();
    
    const m = (firstMultipleInput[1]).toString();
    
  • + 0 comments

    This logic puzzle is a great way to explore algorithmic problem-solving, just like understanding Privacy Policy Details helps users grasp the structure behind data usage.

  • + 0 comments

    return(n*m-1)

  • + 2 comments

    For C++, be careful about the funciton input types. If they are the int types, you may need to change them to the long types in order to avoid any overflows.

  • + 0 comments

    Python easiest solution: def solve(n, m): return m*n-1 For understanding try comparing the values as bigger and smaller and multiply them.