fb pixel

Are the digits the same?

Given an integer n, we would like to know if all the digits of n are equal to each other.
The input of the program contains a single integer n.
The output of the program should be Yes if the digits are the same, and No otherwise.
Input
Output
4434444446
No
888888
Yes
 
To check your solution you need to sign in
Sign in to continue