{"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\u003eAccording to a very famous web site, which in this case we will trust, defines a palindrome\r\nas ‘a word, phrase, verse, or sentence that reads the same backward or forward’. For\r\nexample, the phrase A man, a plan, a canal, Panama! is a palindrome. Actually, writing\r\ntexts consisting of only palindromes is part of a literary technique called constrained writing.\u003cbr\u003e\u003cbr\u003e\r\nNow imagine the wise Yoda, the master of all, whose proficiency putting words together\r\nin sentences is one of his well-known abilities. He is now interested in enriching his long-\r\nlasting, and maybe boring, inactivity periods by ‘composing’ palindromic sentences. That\r\nis, he has plans to use only palindromic sentences for his chats. For this matter, he needs\r\nto practice. The first task in his practice plan is to count all the palindromes that can be\r\narranged out of a collection of characters.\u003cbr\u003e\u003cbr\u003e\r\nToday, you will be Yoda’s assistant for this first task. Your only mission is to, given\r\na sequence of characters, determine how many palindromes can be obtained with some\r\nof the characters in the sequence; you will only take into account uppercase or lowercase\r\nletters. Put in other way, you need to determine how many permutations of a give sequence\r\nof characters are palindromes. Your solution will help definitively master Yoga.\r\n\r\n\r\n\u003c/p\u003e\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eThe input consists of several test cases, one per line. For each test case, the input consist of a\r\nsequence of ASCII characters.\r\n\r\n\r\n\u003c/p\u003e\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eFor each test case you should print in a single line, and according to the order of the test cases,\r\nthe total number of palindromes generated by the input sequence of ASCII characters. For your\r\npurpose, you should only consider uppercase or lowercase characters appearing in the input; any\r\nother character should be ignored in the calculations. Uppercase and lowercase characters are not\r\nconsidered different; for example, A and a should not be considered different. In any case, the\r\ntotal number of palindromes will not exceed the number e^43 , where e is approximately 2.71828.\r\nRemember that the empty sequence is a palindrome itself.\r\n\r\n\r\n\u003c/p\u003e\u003ch3\u003eExample\u003c/h3\u003e\r\n\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\u003eA man, a plan, a canal, Panama!\r\narD,R!A\r\nB.a.C1/\r\n12[’;. \u003d1\r\n\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e15120\r\n2\r\n0\r\n1\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\n\u003c/div\u003e"}}]}