DMOPC '17 Contest 5 P1 - IOI 101

View as PDF

Submit solution

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

The number 1 looks quite similar to the letter l and the letter I. Similarly, the number 0 looks quite similar to the letter o. Sometimes, these simple replacements are used in passwords.

Roger is reviewing his passwords one day, and realizes that he no longer remembers what letters he replaced with numbers! Alarmed, he pulls up the following table:

Number Letter
0 O
1 l
3 E
4 A
5 S
6 G
8 B
9 g

Given a string of alphanumeric characters, can you write a program to perform these replacements?


The given string will contain no more than 1\,000 characters.

Input Specification

The first and only line of input will contain a single string of alphanumeric characters.

Output Specification

The output should have a single string: the result of performing all the replacements on the string given in the input.

Sample Input


Sample Output



  • 7
    hosny  commented on April 7, 2018, 2:01 p.m. edit 3

    can't remove this