Code Challenge problem: Cute girl decoder

Long had a new girl friend, congrats to him. He feels very happy by chatting with her everyday although it’s not an easy work. As a 9x cute girl, she uses a lot of teenage chatting words and it usually takes Long more time to read and understand. And of course, it takes him a lot of his brain’s energy :).

To make it easy, Long plans to build a Skype plugin that can translate her sentences to the normal ones. He found that it’s so easy to replace the cute words by the following rules:

  • With words, she usually use
    • k for khong
    • ko for khong
    • ng for nguoi
    • n for nhieu
    • dc for duoc
    • hok for khong
    • ntn for nhu the nao
    • kq for ket qua
  • She also use these characters
    • j for gi
    • w for qu
    • f for ph
    • dz for d
    • z for d

So if she says “chan wa. em mun an n ga way cho doi jo dc hok dzay?“, it is “chan qua. em muon an nhieu ga quay cho doi gio duoc khong day?

Could you help Long to write this plugin. After that, please try to translate her recent message:

chan wa. em mun an n ga way cho doi jo dc hok dzay? Anh co phai la ng iu cua em k zay, neu a la ng ieu cua em thi fai dua em di an ga way chu, anh ma hem dua em di em jan a lien doa. The gio anh mun ntn? kq ha? ok, neu ma anh hok dua iem di an ga ran thi ng dung den gap em lam ji nua, em k yeu anh nua dau, iu j ma co moi viec dua di an ga way cung ko duoc thi yeu lam j dzay, chan anh vaj dan ra ay. Ngay hom sau em noi j a, em van noi la: chan wa. em mun an n ga way cho doi jo dc hok dzay? Anh co phai la ng iu cua em k zay, neu a la ng ieu cua em thi fai dua em di an ga way chu, anh ma hem dua em di em jan a lien doa. The gio anh mun ntn? kq ha? ok, neu ma anh hok dua iem di an ga ran thi ng dung den gap em lam ji nua, em k yeu anh nua dau, iu j ma co moi viec dua di an ga way cung ko duoc thi yeu lam j dzay, chan anh vaj dan ra ay. Ngay hom sau nua em noi j a, em noi dzay ne: chan wa. em mun an n ga way cho doi jo dc hok dzay? Anh co phai la ng iu cua em k zay, neu a la ng ieu cua em thi fai dua em di an ga way chu, anh ma hem dua em di em jan a lien doa. The gio anh mun ntn? kq ha? ok, neu ma anh hok dua iem di an ga ran thi ng dung den gap em lam ji nua, em k yeu anh nua dau, iu j ma co moi viec dua di an ga way cung ko duoc thi yeu lam j dzay, chan anh vaj dan ra ay.

The solution will be updated in 3 days.

579 total views, 1 views today

Comments

comments