Matched Letters
Time limit2sMemory limit1024 MB
Given a string, the task is to check whether every character is the same letter and print Yes or No.
- Level
Easy1 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
You are given a string of length . Each character of is a lowercase English letter.
Print Yes if all characters of are the same letter, and No otherwise.
Input
The input is given in the following format.
N
S
Output
Print Yes if all characters of are the same letter, and No otherwise.
Do not print anything other than the answer. (Do not print prompts for input or any other text.)
Constraints
- .
- is a string of length .
- Each character of is a lowercase English letter.
- is an integer.