Three identical digits
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Four-digit number is given. Determine if it contains exactly three identical digits.
Input
One four-digit number .
Output
Print "YES" if number contains exactly three identical digits, and "NO" otherwise.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 19K
Acceptance rate 28%