Mod Normalize

Computer Mathematics Easy 2 views
Back to Questions
Next Add Mod M Easy N

Problem Description

Given a and m>0, output normalized a mod m in [0,m-1].

Input Format

Two integers a m.

Output Format

One integer.

Sample Test Case

Input:
-13 5
Output:
2

Constraints

m>0

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Next