Problem : Bajirao is on a date with his girlfriend Avni. It is a romantic night and they…
- User
Problem :
Bajirao is on a date with his girlfriend Avni. It is a romantic night and they are playing a game of words.
The rule of this game is that if Bajirao says a word such that no adjacent letters occurring in the word are same then he gets a kiss from her otherwise he gets a slap. Input :
The first line consists of T the number of test cases. The next T lines are such that each line consists of a single word spoken by Bajirao.
Output
For every test case, on a new line print 'KISS' if Bajirao gets a kiss and 'SLAP' if Bajirao gets a slap.
Constraints :
1 ≤ T ≤ 100
2 ≤ Length of Word spoken by Bajirao ≤ 100
The input word will comprise only of lower case English alphabets (a-z).
Problem Setter : Shreyans
Problem Tester : Sandeep
Problem Statement : Ravi
(By IIT Kgp HackerEarth Programming Club)
SAMPLE INPUT 2 remember occurring
SAMPLE OUTPUT KISS SLAP
Assistant
We are to solve a simple problem: For each word, check if any two adjacent letters are the same. If there is at least one pair of adjacent equal letters, output "SLAP", else output "KISS".
The constraints are small. So we just need to read T, then loop over T words, and for each word check from index 0 to len-2 if word[i] == word[i+1]. If any, print "SLAP", else "KISS".
Edge cases: Words length >=2, so no need to handle empty.
Implement accordingly.
Now, we need to produce a solution in Python (or appropriate language). Since the problem statement is from HackerEarth and we are ChatGPT, we can output code in Python.
I'll write a function solve() reading input.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.