{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\u0027text/css\u0027\u003e .input, .output {border: 1px solid #888888;} .output {margin-bottom:1em;position:relative;top:-1px;} .output pre,.input pre {background-color:#EFEFEF;line-height:1.25em;margin:0;padding:0.25em;} .title {background-color:#FFFFFF;border-bottom: 1px solid #888888;font-family:arial;font-weight:bold;padding:0.25em;} \u003c/style\u003e \u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027]], displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027]]}\n });\n \u003c/script\u003e\n \u003cscript type\u003d\"text/javascript\" async\n src\u003d\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\"\u003e\n \u003c/script\u003e\nSasha, Makar, Ergalym and Timur are already grown-ups. And grown-up guys don\u0027t play any children games. The situation is the same for programming. Our students prefer to have more complicated and more interesting tasks, not childish once. Last lesson Sasha came up with one math game. She made up two integer numbers \u003cb\u003eN\u003c/b\u003e and \u003cb\u003eM\u003c/b\u003e. In the game in one move you could change \u003cb\u003eN\u003c/b\u003e in two ways. The first way: add to \u003cb\u003eN\u003c/b\u003e any positive ODD integer. The second one: subtract from \u003cb\u003eN\u003c/b\u003e any positive EVEN integer. In the game you could do unlimited number of moves. Makar, Ergalym and Timur liked this game very much they wanted to find the minimum number of moves that were necessary to make for obtaining \u003cb\u003eM\u003c/b\u003e from \u003cb\u003eN\u003c/b\u003e. "}},{"title":"Input","value":{"format":"HTML","content":"The first line has integer \u003cb\u003eT\u003c/b\u003e (1 \u003c\u003d T \u003c\u003d 10^4) - the number of test cases. Each test case contains two integer numbers \u003cb\u003eN\u003c/b\u003e and \u003cb\u003eM\u003c/b\u003e (1 \u003c\u003d N, M \u003c\u003d 10^9)."}},{"title":"Output","value":{"format":"HTML","content":"For each test case find the answer - the minimum number of moves to obtain M from N. Sasha, Makar, Ergalym and Timur didn\u0027t make the task more complicated, so it is guaranteed that you always can obtain M from N."}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e \n \u003cdiv class\u003d\"input\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e \n \u003cpre\u003e5\n2 3\n10 10\n2 4\n7 4\n9 3\n\u003c/pre\u003e\n \u003c/div\u003e \n \u003cdiv class\u003d\"output\"\u003e \n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e \n \u003cpre\u003e1\n0\n2\n2\n1\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eIn the first test case, you can just add 1\u003c/p\u003e \n\u003cp\u003eIn the second test case, you don\u0027t need to do anything.\u003c/p\u003e \n\u003cp\u003eIn the third test case, you can add 1 two times.\u003c/p\u003e \n\u003cp\u003eIn the fourth test case, you can subtract 4 and add 1.\u003c/p\u003e \n\u003cp\u003eIn the fifth test case, you can just subtract 6.\u003c/p\u003e"}}]}