Remainder Always Positive

Computer Mathematics Medium 3 views
Back to Questions

Problem Description

Given integers a and m>0, print a mod m in range [0,m-1].

Input Format

Two integers a m.

Output Format

One integer.

Sample Test Case

Input:
-1 5
Output:
4

Constraints

m > 0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next