- 积分
- 27
- 注册时间
- 2008-3-10
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2013-7-22 18:17:29
|
显示全部楼层
来自 英国
题目11:倒读隐语
把每个单词的第一个字母移至末尾,并在其后加上字母ay。
原题链接见:Problem 1721. Backslang, odds are you used it at some point in time...
题目原文:- Hatstay tiay! Onay oremay onay esslay. Ellway erehay reaay omesay xampleseay:
- str = 'The sky is falling, the sky is falling, or is it?'
- output = Hetay kysay siay allingfay, hetay kysay siay allingfay, roay siay tiay?
- Ustjay aay otenay, omesay unctuationpay ndaay apitalscay oday ountcay.
- Oodgay Ucklay!
复制代码 测试题目:
- %%
- str = 'The sky is falling, the sky is falling, or is it?'
- output = 'Hetay kysay siay allingfay, hetay kysay siay allingfay, roay siay tiay?'
- assert(isequal(backslang(str),output))
复制代码- %%
- str = 'If Allen is Janes husband and Tom is Jill husband, who is Roys wife?'
- output = 'Fiay Llenaay siay Anesjay usbandhay ndaay Omtay siay Illjay usbandhay, howay siay Oysray ifeway?'
- assert(isequal(backslang(str),output))
复制代码- %%
- str = 'This is the sentence I will use.'
- output = 'Histay siay hetay entencesay Iay illway seuay.'
- assert(isequal(backslang(str),output))
复制代码- %%
- str = 'Christopher Columbus sailed the ocean blue!'
- output = 'Hristophercay Olumbuscay ailedsay hetay ceanoay luebay!'
- assert(isequal(backslang(str),output))
复制代码 |
|