PROBLEM LINK:
Practice
Contest: Division 1
Contest: Division 2
Contest: Division 3
Contest: Division 4
Author: iceknight1093
Tester: raysh07
Editorialist: iceknight1093
DIFFICULTY:
Cakewalk
PREREQUISITES:
None
PROBLEM:
A string of length 3 is called cute if its middle character is w and its first and third characters are equal.
Given a string S, check if it is cute.
EXPLANATION:
Simply check if S_1 = S_3 and S_2 = \texttt{w}, and print Yes or No appropriately.
TIME COMPLEXITY:
\mathcal{O}(1) per testcase.
CODE:
Editorialist's code (PyPy3)
s = input()
if s[0] == s[2] and s[1] == 'w': print('Cute')
else: print('No')