[BOJ 14547] X X glued
View as PDFDo you know the game "X X glued" practiced on the registration plates of Benin cars by children?</p>
A beninese car registration number is written in the form of VY ABCD RB or Y ABCD RB. For example, AC 2554 RB and X 6006 RB are beninese car registration numbers. The game "X X glued" is to quickly verify that there is in the number two identical consecutive digits or not. The winner is the first child that pronounces "X X collés" and shows the car with his finger.
입력 형식
The input contains several lines and ended with the # character on a single line. Other lines each contain a single registration number as VY ABCD RB or Y ABCD RB.
출력 형식
For each registration number, your program should display on one line, all the " X X glued" in the format shown in the example. If there is no "X X glued" in the number, the program should display nothing.
예제 입력
X 6006 RB
AC 2233 RB
T 2000 RB
F 2345 RB
AB 4444 RB
#
예제 출력
0 0 glued
2 2 glued and 3 3 glued
0 0 glued
4 4 glued
Comments