{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eLucifer is the only human who has defeated RA-ONE in a computer game ...\u003c/p\u003e\r\n\u003cp\u003eRA-One is after lucifer for revenge and G-One is there to protect him ...\u003c/p\u003e\r\n\u003cp\u003eAll thi G-One and Ra-one Nonsense has disturbed Lucifer\u0027s life ...\u003c/p\u003e\r\n\u003cp\u003eHe wants to get Rid of Ra-One and kill him . He found that Ra-One can be killed only by throwing Lucifer number of weapons at him.\u003c/p\u003e\r\n\u003cp\u003eLucifer number shares the some properties of \u003ca href\u003d\"https://www.spoj.com/problems/RAONE/\"\u003eRa-One Numbers\u003c/a\u003e numbers and \u003ca href\u003d\"https://www.spoj.com/problems/GONE/\"\u003eG-One Numbers\u003c/a\u003e\u003c/p\u003e\r\n\u003cp\u003eAny number is LUCIFER NUMBER if the difference between sum of digits at even location and sum of digits at odd location is prime number. For example, 20314210 is a Lucifer number:\u003c/p\u003e\r\n\u003cp\u003edigits at odd location 0, 2, 1, 0.\u003c/p\u003e\r\n\u003cp\u003edigits at even location 1, 4, 3, 2.\u003c/p\u003e\r\n\u003cp\u003edifference \u003d (1+4+3+2)-(0+2+1+0) \u003d 10-3 \u003d 7 ... a prime number.\u003c/p\u003e\r\n\u003cp\u003eLucifer has access to a Warehouse which has lots of weapons. He wants to know in how many ways can he kill him.\u003c/p\u003e\r\n\u003cp\u003eCan you help him?\u003c/p\u003e\r\n\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eFirst line will have a number \u0027t\u0027 denoting the number of test cases.\u003c/p\u003e\r\n\u003cp\u003eeach of the following t lines will have 2 numbers \u0027a\u0027, \u0027b\u0027\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003ePrint single number per test case, depicting the count of Lucifer numbers in the range a, b inclusive.\u003c/p\u003e\r\n\u003ch3\u003eExample\u003c/h3\u003e\r\n\u003cdiv\u003e\u003ctable class\u003d\"vjudge_sample\"\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e5\n200 250\n150 200\n100 150\n50 100\n0 50\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n16\n3\n18\n6\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\r\n\u003cp\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e t will be less than 100. \u0027a\u0027 and \u0027b\u0027 will be between 0 and 10^9 inclusive.\u003c/p\u003e\r\n\n\u003c/div\u003e"}}]}