Subtract Mod M
Computer Mathematics
Easy
2 views
Problem Description
Compute (a-b) mod m (non-negative).
Input Format
Three integers a b m.
Output Format
One integer.
Official Solution
Compute r=(a-b)%m then normalize by adding m if negative.
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!