Uva401Palindromes】的更多相关文章

  Palindromes  A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string…
UVA Online Judge 题目401  Palindromes 回文串 问题描述: 回文串(Palindromes)就是正着读和反着读完全一样的字符串,例如"ABCDEDCBA". 镜像串(Mirrored string)有些类似回文串,字符'3'的镜像可以看成是'E',字符'A'本身就是对称的所以它的镜像字符还是'A'.我们把像"3AIAE"这样的字符串看做镜像串. 镜像回文串(Mirrored palindrome)是符合上面两个条件的字符串,比如&qu…
这一题的话我们可以把映像字符的内容给放入一个字符串常量里面,然后开辟一个二维的字符串常量数组,里面放置答案. 对于回文实际上是很好求的,对于镜像的话,我们写一个返回char的函数,让它接收一个char. 接收之后进行判断,如果它是字母的话,我们就返回它减去'A'这个字母,得到的整数下标对应的镜像字符串中的字母. 如果不是,我们就返回它减去字符0,得到它的整数值,然后加上25得到它的下标,然后返回对应字母. 这题其实很简单,认真看看就行了. #include <stdio.h> #include…
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is read from ri…