Calculate x mod m
Given a very large integer
xthat has up to a million digits, you are asked to calculate the remainder when divided by
The first line of the input contains the integer
x(1 ≤ |x| ≤ ).
The second line contains the integer
m(1 ≤ m ≤ ).
The program should print the result of
Time limit: 1 seconds
Memory limit: 512 MB
Output limit: 1 MB