Ուղարկել | Բոլոր լուծումները | Լավագույն լուծումները | Վերադառնալ ցուցակին |
ACM0304 - X X GLUED |
Do you know the game "X X glued" practiced on the registration plates of Benin cars by children?
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.
Input.
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.
Output.
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.
Sample test.
N |
stdin |
stdout |
1 |
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 |
Ավելացրեց. | Հրանտ Հովհաննիսյան |
Ամսաթիվ. | 2016-07-22 |
Ժամանակի սահմանափակումը. | 1s |
Ծրագրի տեքստի սահմանափակումը. | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Լեզուներ. | Բոլորը բացի ASM32 ASM64 GAWK CLPS CLOJURE D ERL FSHARP FORTRAN GOSU HASK ICON ICK NEM NIM OBJC-CLANG PICO PIKE PYPY PYPY3 PY_NBC RUST SCM guile CHICKEN SED TCL WHITESPACE |
Աղբյուրը. | Beninese Collegiate Programming Contest, 2016 |