{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003cp\u003eChef has recently started attending probability class. For the first three lectures he had no homework but for the fourth lecture he had one to do. The problem was given as range \u003cb\u003e[A,B]\u003c/b\u003e over positive integers, chef has to find the probability of a number chosen at random within the range (including \u003cb\u003eA\u003c/b\u003e and \u003cb\u003eB\u003c/b\u003e) such that it will contain at least one zero.\u003c/p\u003e\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eThe first line of the input contains an integer \u003cb\u003eT\u003c/b\u003e denoting the number of test cases. The description of \u003cb\u003eT\u003c/b\u003e test cases follows.\u003c/li\u003e\n\u003cli\u003eEach line of the test case contains two space separated integers \u003cb\u003eA\u003c/b\u003e and \u003cb\u003eB\u003c/b\u003e denoting the range extremities.\n\u003c/li\u003e\u003c/ul\u003e\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003eFor each test case, output a single line containing the probability in fraction and \u003cb\u003eNOT\u003c/b\u003e in decimal.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cul\u003e\n\u003cli\u003e\u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003eT\u003c/b\u003e ≤ \u003cb\u003e10\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e0\u003c/b\u003e ≤ \u003cb\u003eA\u003c/b\u003e ≤ \u003cb\u003e10\u003csup\u003e5\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e0\u003c/b\u003e ≤ \u003cb\u003eB\u003c/b\u003e ≤ \u003cb\u003e10\u003csup\u003e6\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e \u003c/p\u003e\n\u003ch3\u003eExample\u003c/h3\u003e\n\u003cpre\u003e\u003cb\u003eInput:\u003c/b\u003e\n2\n1 20\n100 999\n\n\u003cb\u003eOutput:\u003c/b\u003e\n2/20\n171/900 \n\u003c/pre\u003e\u003ch3\u003eExplanation\u003c/h3\u003e\n\u003cp\u003e\u003cb\u003eExample case 1.\u003c/b\u003eThe range given is 1 to 20. So look at all the integers from 1 to 20, inclusive, we find that 10 and 20 are the only two numbers that have a zero in them. And hence the probability to find them is 2/20. \u003c/p\u003e\n"}}]}