QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23941. 같은 문자

Statistics

길이 $N$인 문자열 $S$가 주어진다. $S$의 각 문자는 영어 소문자이다.

$S$가 모두 같은 문자로 이루어져 있다면 Yes를, 그렇지 않다면 No를 출력하라.

입력

입력은 다음 형식으로 주어진다.

$$ \begin{aligned} &N \\ &S \end{aligned} $$

출력

$S$가 모두 같은 문자로 이루어져 있다면 Yes를, 그렇지 않다면 No를 출력하라.

답 이외에는 아무것도 출력하지 말 것. (입력을 유도하는 문장 등도 출력하지 말 것.)

해답 형식에 대해서는 연습문제나 그 해답 예를 참고해도 좋다.

제한

  • $2 \le N \le 100$.
  • $S$는 길이 $N$인 문자열이다.
  • $S$의 각 문자는 영어 소문자이다.
  • $N$은 정수이다.

예제

입력 1

4
bbbb

출력 1

Yes

노트 1

  • 문자열 bbbb는 모두 같은 문자 b로 이루어져 있으므로, Yes를 출력한다.

입력 2

7
pppdppp

출력 2

No

노트 2

  • 문자열 pppdppp에는 p와 d가 포함되어 있어 모두 같은 문자로 이루어진 것이 아니므로, No를 출력한다.

입력 3

2
xx

출력 3

Yes

노트 3

  • 문자열 xx는 모두 같은 문자 x로 이루어져 있으므로, Yes를 출력한다.

입력 4

9
joijoijoi

출력 4

No

노트 4

  • 문자열 joijoijoi는 모두 같은 문자로 이루어진 것이 아니므로, No를 출력한다.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.