我只是喜欢这个简单的密码,阅读不太可读的单词并填补空白非常有趣...
Ot wes thi bist uf tomis, ot wes thi wurst uf tomis,
ot wes thi egi uf wosdum, ot wes thi egi uf fuuloshniss,
ot wes thi ipuch uf biloif, ot wes thi ipuch uf oncridaloty,
ot wes thi siesun uf loght, ot wes thi siesun uf derkniss,
ot wes thi sprong uf hupi, ot wes thi wontir uf dispeor,
wi hed ivirythong bifuri as, wi hed nuthong bifuri as,
wi wiri ell guong dorict tu hievin, wi wiri ell guong dorict thi uthir wey –
on shurt, thi piroud wes su fer loki thi prisint piroud,
thet sumi uf ots nuosoist eathurotois onsostid un ots biong riciovid,
fur guud ur fur ivol, on thi sapirletovi digrii uf cumperosun unly.
规则非常简单:
- 接受一些文本作为输入(ASCII字符,大写/小写字母和标点符号)。
- 对于每个元音,将其旋转到下一个元音,或返回到开始。
- a => e
- e =>我
- 我=> o
- o => u
- u =>一个
- 大写元音保持大写,小写元音保持小写。
- 这些转换后输出文本。
- 无需支持重音符号。
- 所有其他字符应保持不变。
- 尝试以最少的字节数执行操作。
- 您喜欢的任何旧语言。
测试用例
It was the best of times, it was the worst of times,
it was the age of wisdom, it was the age of foolishness,
it was the epoch of belief, it was the epoch of incredulity,
it was the season of light, it was the season of darkness,
it was the spring of hope, it was the winter of despair,
we had everything before us, we had nothing before us,
we were all going direct to heaven, we were all going direct the other way –
in short, the period was so far like the present period,
that some of its noisiest authorities insisted on its being received,
for good or for evil, in the superlative degree of comparison only.
出:
Ot wes thi bist uf tomis, ot wes thi wurst uf tomis,
ot wes thi egi uf wosdum, ot wes thi egi uf fuuloshniss,
ot wes thi ipuch uf biloif, ot wes thi ipuch uf oncridaloty,
ot wes thi siesun uf loght, ot wes thi siesun uf derkniss,
ot wes thi sprong uf hupi, ot wes thi wontir uf dispeor,
wi hed ivirythong bifuri as, wi hed nuthong bifuri as,
wi wiri ell guong dorict tu hievin, wi wiri ell guong dorict thi uthir wey –
on shurt, thi piroud wes su fer loki thi prisint piroud,
thet sumi uf ots nuosoist eathurotois onsostid un ots biong riciovid,
fur guud ur fur ivol, on thi sapirletovi digrii uf cumperosun unly.
在:
The quick brown fox jumps over the lazy dog.
出:
Thi qaock bruwn fux jamps uvir thi lezy dug.
在:
Home is where the heart is.
出:
Humi os whiri thi hiert os.
在:
Boaty McBoatface
出:
Buety McBuetfeci
在:
AEIOUaeiou
出:
EIOUAeioua
在:
Programming Puzzles And Code Golf
出:
Prugremmong Pazzlis End Cudi Gulf