Don't understand why long long is still needed.

  • 0

    If keep use labs() but unsigned int for dvd and dvs:
    Below test case will time out.

    change it to long seems ok.

  • 2

    Because if you take the absolute value of -2147483648 it will over flow as value will be INT_MAX +1

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.