codeforces-scrape

Codeforces scraped problems and editorials
git clone git://git.laack.co/codeforces-scrape.git
Log | Files | Refs | README

691B.md (970B)


      1 Source: https://codeforces.com/problemset/problem/691/B
      2 
      3 B. s-palindrome
      4 
      5 time limit per test
      6 
      7 1 second
      8 
      9 memory limit per test
     10 
     11 256 megabytes
     12 
     13 input
     14 
     15 standard input
     16 
     17 output
     18 
     19 standard output
     20 
     21 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.
     22 
     23  ![](https://espresso.codeforces.com/baf8111c4cf709f89a55071c2064096a68c3c232.png) English alphabet 
     24 
     25 You are given a string *s*. Check if the string is "s-palindrome".
     26 
     27 Input
     28 
     29 The only line contains the string *s* (1 ≤ |*s*| ≤ 1000) which consists of only English letters.
     30 
     31 Output
     32 
     33 Print "TAK" if the string *s* is "s-palindrome" and "NIE" otherwise.
     34 
     35 Examples
     36 
     37 Input
     38 
     39 ```
     40 oXoxoXo
     41 ```
     42 
     43 Output
     44 
     45 ```
     46 TAK
     47 ```
     48 
     49 Input
     50 
     51 ```
     52 bod
     53 ```
     54 
     55 Output
     56 
     57 ```
     58 TAK
     59 ```
     60 
     61 Input
     62 
     63 ```
     64 ER
     65 ```
     66 
     67 Output
     68 
     69 ```
     70 NIE
     71 ```