{"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\u003eIn the War between good and evil . Ra-One is on the evil side and G-One on the good side.\u003c/p\u003e\r\n\u003cp\u003eRa-One is fond of destroying cities and its G-one\u0027s duty to protect them..\u003c/p\u003e\r\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\r\n\u003cp\u003eRa-One loves to destroy cities whose Zip Code has special properties. He says he loves to destroy cities which have Ra-One numbers as their Zip Code.\u003c/p\u003e\r\n\u003cp\u003eAny number is Ra-one if the Difference between Sum of digits at even location and Sum of digits at odd location is One (1).. For eg... for 234563 is Ra-One number\u003c/p\u003e\r\n\u003cp\u003edigits at odd location are 3,5,3 (unit place is location 1 )\u003c/p\u003e\r\n\u003cp\u003edigits at even location are 2,4,6\u003c/p\u003e\r\n\u003cp\u003eDiff \u003d (2+4+6)-(3+5+3)\u003d12-11 \u003d 1.\u003c/p\u003e\r\n\u003cp\u003eAnd 123456 is not Ra-One number\u003c/p\u003e\r\n\u003cp\u003ediff \u003d (5+3+1) - (2+4+6) \u003d -4\u003c/p\u003e\r\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\r\n\u003cp\u003eG-One knows this about Ra-one and wants to deploy his Army members in those cities. 1 army member will be deployed in each city.\u003c/p\u003e\r\n\u003cp\u003eG-one knows the range of ZIP-Codes where Ra-One might attack \u0026amp; needs your help to find out how many army members he needs.\u003c/p\u003e\r\n\u003cp\u003eCan you help Him ?\u003c/p\u003e\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eFirst line will have only one integer \u0027t\u0027 number of Zip-Code ranges. it is followed by t lines\u003c/p\u003e\r\n\u003cp\u003eEach line from 2nd line contains 2 integer \u0027from\u0027\u0026nbsp; and \u0027to\u0027. These indicate the range of Zip codes where Ra-one might attack. (\u0027From\u0027 and \u0027to\u0027 are included in the range)\u003c/p\u003e\r\n\u003cp\u003e\u003cstrong\u003eNOTE:\u003c/strong\u003e\u0027t\u0027 will be less than 100. \u0027from\u0027 and \u0027to\u0027 will be between 0 and 10^8 inclusive.\u003c/p\u003e\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eA single number for each test case telling how many army members G-One needs to deploy.\u003c/p\u003e\r\n\u003cp\u003eeach number should be on separate lines\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\u003e2\r\n1 10\r\n10 100\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\r\n9\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003c/div\u003e\r\n\r\n\u003ch4\u003eexplanation:\u003c/h4\u003e\r\n\u003cp\u003efor 1st test case the only number is 10\u003c/p\u003e\r\n\u003cp\u003efor 2nd test case numbers are 10, 21, 32, 43, 54, 65, 76, 87, 98\u003c/p\u003e\r\n\n\u003c/div\u003e"}}]}