{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n A sequence of positive integers is Palindromic if it reads the same forward and backward. For example: \n \u003cbr\u003e23 11 15 1 37 37 1 15 11 23 \n \u003cbr\u003e1 1 2 3 4 7 7 10 7 7 4 3 2 1 1 \n \u003cbr\u003eA Palindromic sequence is Unimodal Palindromic if the values do not decrease up to the middle value and then (since the sequence is palindromic) do not increase from the middle to the end For example, the first example sequence above is NOT Unimodal Palindromic while the second example is. \n \u003cbr\u003eA Unimodal Palindromic sequence is a Unimodal Palindromic Decomposition of an integer N, if the sum of the integers in the sequence is N. For example, all of the Unimodal Palindromic Decompositions of the first few integers are given below: \n \u003cbr\u003e1: (1) \n \u003cbr\u003e2: (2), (1 1) \n \u003cbr\u003e3: (3), (1 1 1) \n \u003cbr\u003e4: (4), (1 2 1), (2 2), (1 1 1 1) \n \u003cbr\u003e5: (5), (1 3 1), (1 1 1 1 1) \n \u003cbr\u003e6: (6), (1 4 1), (2 2 2), (1 1 2 1 1), (3 3), \n \u003cbr\u003e(1 2 2 1), ( 1 1 1 1 1 1) \n \u003cbr\u003e7: (7), (1 5 1), (2 3 2), (1 1 3 1 1), (1 1 1 1 1 1 1) \n \u003cbr\u003e8: (8), (1 6 1), (2 4 2), (1 1 4 1 1), (1 2 2 2 1), \n \u003cbr\u003e(1 1 1 2 1 1 1), ( 4 4), (1 3 3 1), (2 2 2 2), \n \u003cbr\u003e(1 1 2 2 1 1), (1 1 1 1 1 1 1 1) \n \u003cbr\u003e \n \u003cbr\u003eWrite a program, which computes the number of Unimodal Palindromic Decompositions of an integer. \n \u003cbr\u003e\n \u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n Input consists of a sequence of positive integers, one per line ending with a 0 (zero) indicating the end. It is guaranteed that the answer will not exceed the range of unsigned int.\n \u003cbr\u003e\n \u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n For each input value except the last, the output is a line containing the input value followed by a space, then the number of Unimodal Palindromic Decompositions of the input value. See the example on the next page. \n \u003cbr\u003e\n \u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e2\n3\n4\n5\n6\n7\n8\n10\n23\n24\n131\n213\n92\n0\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e2 2\n3 2\n4 4\n5 3\n6 7\n7 5\n8 11\n10 17\n23 104\n24 199\n131 5010688\n213 1055852590\n92 331143\u003c/pre\u003e"}}]}