2023-10-23 23:16:24 +02:00
|
|
|
import readline from "node:readline"
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
const input = []
|
|
|
|
const readlineInterface = readline.createInterface({
|
|
|
|
input: process.stdin,
|
2023-10-23 23:16:24 +02:00
|
|
|
output: process.stdout,
|
2021-06-09 20:31:45 +02:00
|
|
|
})
|
2023-10-23 23:16:24 +02:00
|
|
|
readlineInterface.on("line", (value) => {
|
2021-06-09 20:31:45 +02:00
|
|
|
input.push(value)
|
|
|
|
})
|
2023-10-23 23:16:24 +02:00
|
|
|
readlineInterface.on("close", solution)
|
2021-06-09 20:31:45 +02:00
|
|
|
|
|
|
|
function solution() {
|
2023-10-23 23:16:24 +02:00
|
|
|
const string = input[0].replace(/ /g, "").toLowerCase()
|
|
|
|
const isPalindrome = string.split("").reverse().join("") === string
|
2021-06-09 20:31:45 +02:00
|
|
|
console.log(isPalindrome)
|
|
|
|
}
|