#P110. 回文數字

回文數字

題目描述

Determine whether an integer is a "palindrome". An integer is a palindrome when it reads the same backward as forward.

輸入格式

a integer num

-30000<=num<=30000

 

輸出格式

True or False

Samples

["121","-121","1345"]
["True","True","False"]

提示

You can simply read the input() as string (no "integer conversion" is needed this time) and then verify the digit (from both directions, left and right). Note that you may need to handle the "negative" symbol by yourself.

>> thislist = ["apple", "banana", "cherry"]
>> print(thislist[::-1])

原始資料

  • Zero1 題號:a110
  • Hydro 題號:Z0110
  • Locale:zh_TW
  • Display:open