AtCoder Beginner Contest 079
翻译中…
Problem Statement
翻译中…
We call a $4$-digit integer with three or more consecutive same digits, such as $1118$, good.
翻译中…
You are given a $4$-digit integer $N$. Answer the question: Is $N$ good?
翻译中…
Constraints
翻译中…
$1000 ≤ N ≤ 9999$$N$is an integer.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
If $N$ is good, print Yes; otherwise, print No.
翻译中…
样例
Input #1
1118
Output #1
Yes
$N$ is **good**, since it contains three consecutive $1$.
Input #2
7777
Output #2
Yes
An integer is also **good** when all the digits are the same.
Input #3
1234
Output #3
No
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。