a022. 迴文
Tags : 字串 迴文
Accepted rate : 26971人/28155人 ( 96% ) [非即時]
評分方式:
Tolerant

最近更新 : 2021-03-24 11:57

Content

迴文的定義為正向,反向讀到的字串均相同

如:abba , abcba ... 等就是迴文

 請判斷一個字串是否是一個迴文?

Input

輸入資料共一行包含一個字串(長度 < 1000)

Output

針對每一行輸入字串輸出 yes or no

Sample Input #1
abba
Sample Output #1
yes
Sample Input #2
abcd
Sample Output #2
no
測資資訊:
記憶體限制: 512 MB
公開 測資點#0 (10%): 1.0s , <1K
公開 測資點#1 (10%): 1.0s , <1K
公開 測資點#2 (10%): 1.0s , <1K
公開 測資點#3 (10%): 1.0s , <1K
公開 測資點#4 (10%): 1.0s , <1K
公開 測資點#5 (10%): 1.0s , <1K
公開 測資點#6 (10%): 1.0s , <1K
公開 測資點#7 (10%): 1.0s , <1K
公開 測資點#8 (10%): 1.0s , <1K
公開 測資點#9 (10%): 1.0s , <1K
Hint :
Tags:
字串 迴文
出處:
[管理者: jiangsir (jiangsir) ]

Status Forum 排行

ID User Problem Subject Hit Post Date
39598 dreamer.aeu6 ... (Noah) a022
1034 2024-03-10 00:00
39597 dreamer.aeu6 ... (Noah) a022
397 2024-03-10 00:00
39438 yuntongliang ... (105 23梁允同) a022
1280 2024-02-21 17:20
39378 chiuliyou@gm ... (邱立宇) a022
495 2024-02-11 12:41
41281 suyueh (suyueh) a022
python
660 2024-07-16 14:01