{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003ch1\u003e\u003cbr clear\u003d\"ALL\"\u003e\n \u003ccenter\u003e\n \u003ctable bgcolor\u003d\"#0060F0\"\u003e\n \u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"5\" color\u003d\"#C0FFFF\"\u003e\u0026nbsp;\u003ca name\u003d\"SECTION0001000000000000000000\"\u003ePalindroms \u003cimg width\u003d\"29\" height\u003d\"10\" align\u003d\"BOTTOM\" alt\u003d\"tex2html_wrap_inline26\" src\u003d\"CDN_BASE_URL/cd2b3e4535c03ca173ef3344a7933ada?v\u003d1671695235\"\u003e smordnilaP\u003c/a\u003e\u003c/font\u003e\u0026nbsp;\u003c/b\u003e\u003c/td\u003e\n \u003c/tr\u003e\n \u003c/tbody\u003e\n \u003c/table\u003e\n \u003c/center\u003e\u003c/h1\u003e\n\u003cp\u003eThe following problem deals with \u003ci\u003ePalindroms\u003c/i\u003e composed of digits. A number is a palindrom, if the sequence of signs (digits or characters) read from left to right and read from right to left are identical. Now, given the number 65 with base 10, adding the number read from right to left , that means 56, leads to 121. By definition 121 is a palindrom. With another number you might have to repeat this step until the sum is of the required palindrom form. eg. 87:\u003c/p\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003cpre\u003e 87 + 78 \u003d 165\n 165 + 561 \u003d 726\n 726 + 627 \u003d 1353\n 1353 + 3531 \u003d 4884\u003c/pre\u003e\n\u003cp\u003eThe number of steps is 4.\u003c/p\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003cp\u003eThis works in any base with any number. Naturally the number of steps increases incredibly fast, so there exist numbers in base 10 that requires more than 10,000 steps. You will have to find the numbers of steps of a given number in all the bases 15 down to 2. When a Number is in an illegal form in a base, the number of Steps will be represented by a ``\u003ctt\u003e?\u003c/tt\u003e\".\u003c/p\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003ch2\u003e\u003cfont color\u003d\"#0070E8\"\u003e\u003ca name\u003d\"SECTION0001001000000000000000\"\u003eExample\u003c/a\u003e\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003cpre\u003eBase 15 87 + 78 \u003d 110\n110 + 011 \u003d 121 2 steps\nBase 14 87 + 78 \u003d 111 1 step\nBase 13 87 + 78 \u003d 132\n132 + 231 \u003d 363 2 steps\nBase 12 87 + 78 \u003d 143\n143 + 341 \u003d 484 2 steps\nBase 11 87 + 78 \u003d 154\n154 + 451 \u003d 5A5 2 steps\nBase 10 87 + 78 \u003d 165\n165 + 561 \u003d 726\n726 + 627 \u003d 1353\n1353 + 3531 \u003d 4884 4 steps\nBase 9 87 + 78 \u003d 176\n176 + 671 \u003d 857\n857 + 758 \u003d 1726\n1762 + 2671 \u003d 7543\n7543 + 3457 \u003d 12111\n12111 + 11121 \u003d 23232 6 steps\nBase 8 illegal ? steps\nBase 7 illegal ? steps\nBase 6 illegal ? steps\nBase 5 illegal ? steps\nBase 4 illegal ? steps\nBase 3 illegal ? steps\nBase 2 illegal ? steps\u003c/pre\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003ch2\u003e\u003cfont color\u003d\"#0070E8\"\u003e\u003ca name\u003d\"SECTION0001002000000000000000\"\u003eInput and Output\u003c/a\u003e\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003eThe input contains several lines, each of them having a legal base 15 integer.\u003cbr\u003e\u003cbr\u003e For each line of the input print a single line containing the 14 \u003ci\u003enumber\u003c/i\u003e of steps in all bases 15 down to 2 separated by a blank space. The number of steps will never be bigger than 100.\u003c/p\u003e\n\u003ch2\u003e\u003cfont color\u003d\"#0070E8\"\u003e\u003ca name\u003d\"SECTION0001003000000000000000\"\u003eSample Input\u003c/a\u003e\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003cpre\u003e87\nED\n\u003c/pre\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003ch2\u003e\u003cfont color\u003d\"#0070E8\"\u003e\u003ca name\u003d\"SECTION0001004000000000000000\"\u003eSample Output\u003c/a\u003e\u003c/font\u003e\u003c/h2\u003e\n\u003cp\u003e\u003c/p\u003e\n\u003cpre\u003e2 1 2 2 2 4 6 ? ? ? ? ? ? ?\n19 ? ? ? ? ? ? ? ? ? ? ? ? ?\n\u003c/pre\u003e\n\u003cp\u003e\u003c/p\u003e"}}]}