Palindrome String Check


Submit solution

Points: 10
Time limit: 1.0s
Memory limit: 10M

Author:
Problem type

Description

請撰寫一個程式,輸入一個字串,判斷是否為回文 (Palindrome)。

回文定義:字串正著讀與反著讀相同。

Requirements

  1. 輸入

    • 一個字串 s
    • 判斷時不區分大小寫,可使用 s.toLowerCase() 或是 s.toUpperCase()
  2. 輸出

    • 若為回文,輸出 true 否則輸出 false

Input and Output

Sample 1 Sample 2 Sample 3
INPUT madam Hello Level
OUTPUT true false true

Comments

There are no comments at the moment.