任务
您的任务是将文本转换为中世纪的拼字法。
细节
j
被转换为i
与J
向I
。u
和U
单词的开头分别转换为v
和V
。v
和V
除单词开头以外的任何地方分别转换为u
和U
。s
ſ
除非在单词的末尾或另一个之前,否则将转换为(U + 017F)s
。
眼镜
- 单词定义为中的字母序列
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
。 - 所有单词将至少包含两个字母。
- 输入将仅包含可打印的ASCII字符(U + 0020-U + 007E)。
- 连续出现的次数不会超过两次
s
。也就是说,sss
将不会是输入的子字符串。
测试用例
个别词:
Input Output
------------------------
Joy Ioy
joy ioy
Universe Vniuerſe
universe vniuerſe
Success Succeſs
successfull ſucceſsfull
Supervise Superuiſe
supervise ſuperuiſe
Super-vise Super-viſe
I've I've
majors maiors
UNIVERSE VNIUERSE
0universe 0vniuerſe
0verify 0verify
I0ve I0ve
_UU_ _VU_
_VV_ _VU_
ss_ ſs_
整个段落:
Input: Christian Reader, I have for thy use collected this small Concordance, with no small labour. For being to comprise much in little roome, I was to make choyse of the most principall and usefull places, and to rank them under such words as I thought most essentiall and materiall in the sentence, because the scant roome allotted unto me, would not permit that I should expresse them under every word in the verse, as it is the manner in large Concordances.
Output: Chriſtian Reader, I haue for thy vſe collected this ſmall Concordance, with no ſmall labour. For being to compriſe much in little roome, I was to make choyſe of the moſt principall and vſefull places, and to rank them vnder ſuch words as I thought moſt eſsentiall and materiall in the ſentence, becauſe the ſcant roome allotted vnto me, would not permit that I ſhould expreſse them vnder euery word in the verſe, as it is the manner in large Concordances.
最后一个测试用例的输出的SHA-256哈希为:
5641899e7d55e6d1fc6e9aa4804f2710e883146bac0e757308afc58521621644
免责声明
Medievall拼字术不是那样的竞争者。如果您要用不同的拼字法对旧书进行折衷,请不要打扰。
1
“允许在输出中使用f而不是“。” 因此,基本上没有动力使用ſ,因为它占用更多字节。
—
致命
@Fatalize公平点。删除了那个。
—
Leaky Nun
@LeakyNun然后我们可以算作
—
R. Kap
ſ
1个字节吗?
如果不使用ſ,实际上在某些算法中会以ff的形式将ff变为fs的激励
—
Destructible Lemon
不应该
—
R. Kap
Super-vise
成为Super-viſe
?