{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"\u003cp\u003e In the intricate dance of love\u0027s longing, Masum is captivated by a girl enchanted by palindromic numbers. Despite his affection, she remains distant, lost in the maze of numerical mysteries. Undeterred, Masum vows to win her heart, his determination burning like a fiery beacon in the night.\n\nSensing Masum\u0027s devotion, the girl issues a challenge: \"Calculate the sum of palindromic numbers from L to R.\" It\u0027s a daring task, stirring Masum\u0027s passion to its core. With each calculation, hope blooms within him, a flicker of light amidst the shadows of doubt.\n\nEmbracing the challenge as a test of his love\u0027s strength, Masum pours his heart into each digit. Every palindrome becomes a symbol of his unwavering commitment, a testament to the depth of his desire.\n\nFueled by his burning passion, Masum embarks on his quest, ready to conquer any obstacle in his path. For him, this challenge is not just about numbers; it\u0027s a battle for love, a journey of perseverance and devotion to win the heart of his beloved amidst the tumultuous sea of uncertainty.\u003c/\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"}}]}