MeetCode
Add Mod M
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Run
Submit
Dark
Problem Statement
Solutions
Submissions
Add Mod M
Easy
Computer Mathematics
Modular Arithmetic
30 views
Explanation
Complexity
Problem Statement
Compute (a+b) mod m for large a,b.
Input Format
Three integers a b m.
Output Format
One integer.
Example
Input
1000000000000 7 10
Output
7
Constraints
m>0
Input / Output Format
Input Format
Three integers a b m.
Output Format
One integer.
Constraints
m>0
Examples
Input:
1000000000000 7 10
Output:
7
Example Solution (Public)
Computer Mathematics
Normalize a and b then (a+b)%m.
Official Solution Code
Wrap
Copy
Normalize a and b then (a+b)%m.
Please
login
to submit solutions.
Editor
C
C++
Computer Mathematics
CSS
DSA
HTML
Java
JavaScript
NodeJS
PHP
Programming Interview
Python
ReactJS
SQL
Test Cases
Output
Submission Result
Input
1000000000000 7 10
Expected Output
7
Compile Output
Error
Output
Please
login
to submit solutions.