Back
Close

Is there one palindrome?

Statement

 Goal

Your task is to find whether a given sentence contains one and only one palindrome (case ignored).

A palindrome is a word which reads the same backwards (case ignored).

For this puzzle we define word as an arbitrary number of letters or digits separated by a space.


For instance both 1991 and bob are palindromes.

In this puzzle, a palindrome must contain at least 2 letters or digits to be valid.
Input
Line 1: The sentence to test.

Note : In this puzzle, sentences do not end with a punctuation mark
Output
Line 1: True if the sentence contains one and only one palindrome, False otherwise
Constraints
Example
Input
Cats like dogs
Output
False

Game modes
Fastest, Shortest, Reverse

Test cases
Cats and dogs Test
Input
Cats like dogs
Output
False

Dogs and cats Validator
Input
Dogs love cats
Output
False

Bob and Alice Test
Input
Bob often sends stuff to Alice
Output
True

Who's Natan? Validator
Input
Natan doesn't send much though
Output
True

DVD and your dad Test
Input
Your dad doesn't know what a DVD is
Output
False

DVD and your parents Validator
Input
Neither your mom nor your dad do actually
Output
False

Linux! Test
Input
The first version of Linux came out in 1991
Output
True

Something, probably Validator
Input
I'm sure something nice happened in 1881 as well
Output
True

Apple II Test
Input
The Apple II had 22 kilobytes of RAM
Output
False

IT'S HUGE Validator
Input
Wow 22 kilobytes is HUGE
Output
False

Wise programmer Test
Input
A good programmer does not need to check his code
Output
False

Debugging Validator
Input
Running a program once is enough to make sure it works
Output
False

Wut? Test
Input
Deified racecar
Output
False

If you say so... Validator
Input
Civic radar
Output
False

Solution language

Solution

Stub generator input