All submissions for this problem are available.
Write a program to find the remainder when two given numbers are divided.
The first line contains an integer T, total number of test cases. Then follow T lines, each line contains two Integers A and B.
Find remainder when A is divided by B.
- 1 ≤ T ≤ 1000
- 1 ≤ A,B ≤ 10000
Input 3 1 2 100 200 10 40 Output 1 100 10
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.