CF691B.s-palindrome

普及/提高-

通过率:0%

时间限制:1.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Let's call a string "s-palindrome" if it is symmetric about the middle of the string. For example, the string "oHo" is "s-palindrome", but the string "aa" is not. The string "aa" is not "s-palindrome", because the second half of it is not a mirror reflection of the first half.

English alphabet

You are given a string s. Check if the string is "s-palindrome".

我们称一个字符串为“s-回文串”,如果它关于字符串中心对称。例如,字符串 "oHo" 是“s-回文串”,但字符串 "aa" 不是。“aa”不是“s-回文串”,因为它的后半部分并非前半部分的镜像反射。

英文字母表

给定一个字符串 $ s $,请判断该字符串是否为“s-回文串”。

输入格式

The only line contains the string s (1 ≤ |s| ≤ 1000) which consists of only English letters.

唯一的一行包含字符串 ss(1 ≤ ∣s∣ ≤ 10001 \le |s| \le 1000),该字符串仅由英文字母组成。

输出格式

Print "TAK" if the string s is "s-palindrome" and "NIE" otherwise.

如果字符串 ss 是“s-回文串”,则输出 TAK,否则输出 NIE。

输入输出样例

  • 输入#1

    oXoxoXo

    输出#1

    TAK
  • 输入#2

    bod

    输出#2

    TAK
  • 输入#3

    ER

    输出#3

    NIE

输入解题思路,AI测评打分。不知道怎么写?

首页