{"trustable":false,"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":"\u003chtml\u003e\n \u003chead\u003e\u003c/head\u003e\n \u003cbody\u003e\n \u003cdiv id\u003d\"problem-body\"\u003e \n \u003cp\u003eThe Hero Association has invaded the Monster Association\u0027s hideout with their ultimate weapon Tornado of Terror.\u003c/p\u003e \n \u003cp\u003eKnowing this, all of the Monster Association is currently in chaos. But their leader Psykos knows a grave weakness of Tornado. She can be hurt using the memory gun. A memory gun uses memory bullets where each bullet comes with a distinct number. But not all of the bullets can hurt tornado, only bullets with Saitama numbers can stop her.\u003c/p\u003e \n \u003cp\u003eA Saitama number is a number whose sum of digits is a prime number\u003c/p\u003e \n \u003cp\u003eFor eg. 12 .. sum \u003d 1+2 \u003d3 ... 3 is a prime number.\u003c/p\u003e \n \u003cp\u003ePsykos has a bag of memory bullets from number \u003cb\u003eA\u003c/b\u003e to \u003cb\u003eB\u003c/b\u003e. Now she wants how many bullets she has that can actually hurt Tornado. \u003c/p\u003e \n \u003cp\u003eCan You help Him.?\u003c/p\u003e \n \u003ch3\u003eInput\u003c/h3\u003e \n \u003cp\u003efirst line has number \u003cb\u003eT (T\u0026#60;\u003d100)\u003c/b\u003e indicating the number of test cases.\u003c/p\u003e \n \u003cp\u003e\u003cb\u003eT\u003c/b\u003e lines follow and contain two numbers ..... \u003cb\u003eA\u003c/b\u003e and \u003cb\u003eB\u003c/b\u003e \u003cb\u003e(A,B\u0026#60\u003d10^8) inclusive.\u003c/p\u003e \n \u003ch3\u003eOutput\u003c/h3\u003e \n \u003cp\u003ePrint a single line per case giving the number of bullets with Saitama numbers.\u003c/p\u003e \n \u003ch3\u003eExample\u003c/h3\u003e \n \u003cpre\u003e\u003cstrong\u003eInput:\u003c/strong\u003e\n3\u003cbr\u003e10 19\u003cbr\u003e1 9\u003cbr\u003e20 29\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\u0026nbsp;\u003cstrong\u003eOutput:\u003c/strong\u003e\n\u003cbr\u003e4\u003cbr\u003e4\u003cbr\u003e5\u003cbr\u003e\u003cbr\u003e\u003cstrong\u003eNote\u003c/strong\u003e: 10 to 19 contains 4 Saitama number 11,12,14,16\u003cbr\u003e\u003c/pre\u003e \n \u003c/div\u003e\n \u003c/body\u003e\n\u003c/html\u003e"}}]}