{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003ch3\u003e Read problems statements in \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/LTIME28/mandarin/SPALNUM.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003eMandarin Chinese \u003c/a\u003e , \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/LTIME28/russian/SPALNUM.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003eRussian\u003c/a\u003e and \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/LTIME28/vietnamese/SPALNUM.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003eVietnamese\u003c/a\u003e\u003c/h3\u003e\n\n\n\u003cp\u003eA number is called \u003ci\u003epalindromic\u003c/i\u003e if its decimal representation is a palindrome. You are given a range, described by a pair of integers \u003cb\u003eL\u003c/b\u003e and \u003cb\u003eR\u003c/b\u003e. Find the sum of all palindromic numbers lying in the range \u003cb\u003e[L, R]\u003c/b\u003e, inclusive of both the extrema.\u003c/p\u003e\n\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\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/p\u003e\n\u003cp\u003eThe first line of each test case contains a pair of space separated integers \u003cb\u003eL\u003c/b\u003e and \u003cb\u003eR\u003c/b\u003e denoting the range for which you are required to find the sum of the palindromic numbers. \u003c/p\u003e\n\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each test case, output a single line containing the sum of all the palindromic numbers in the given range.\n\u003c/p\u003e\n\n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cul\u003e\u003cli\u003e\u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003eT\u003c/b\u003e ≤ \u003cb\u003e100\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003eSubtask 1 (34 points) : \u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003eL\u003c/b\u003e ≤ \u003cb\u003eR\u003c/b\u003e ≤ \u003cb\u003e10\u003csup\u003e3\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003eSubtask 2 (66 points) : \u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003eL\u003c/b\u003e ≤ \u003cb\u003eR\u003c/b\u003e ≤ \u003cb\u003e10\u003csup\u003e5\u003c/sup\u003e\u003c/b\u003e\u003c/li\u003e\n\u003c/ul\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\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\n1 10\n123 150\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e45\n272\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u003cb\u003eExample case 1. \u003c/b\u003eThe palindromic numbers between \u003cb\u003e1\u003c/b\u003e and \u003cb\u003e10\u003c/b\u003e are all numbers except the number \u003cb\u003e10\u003c/b\u003e. Their sum is 45.\u003c/p\u003e\n\u003cp\u003e\u003cb\u003eExample case 2. \u003c/b\u003eThe palindromic numbers between \u003cb\u003e123\u003c/b\u003e and \u003cb\u003e150\u003c/b\u003e are \u003cb\u003e131\u003c/b\u003e and \u003cb\u003e141\u003c/b\u003e and their sum is \u003cb\u003e272\u003c/b\u003e.\u003c/p\u003e"}}]}