Timer is Running

BigInteger mod
Submissions: 5707   Accuracy:


  Difficulty: Easy   Marks: 2
Associated Course(s):   Fork Java

Given two BigIntegers X and Y. Your task is find remainder when X divides Y.

Input Format :
First line of input contains T, number of testcases. For each testcase, there will be single line containing X and Y.

Output Format :
For each testcase, output the remainder when X divides Y.

1 <= T <= 10
1 <= X, Y <= 1030

User Task: Your task is to complete the function mod() which returns remainder when X divides Y.


18761 187611


Testcase 1:
Remainder is 1 when X divides Y.

** For More Input/Output Examples Use 'Expected Output' option **

Author: Dhiman Mayank

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.

to report an issue on this page.