仕事
あなたの仕事は、テキストを中世の正書法に変換することです。
細部
j
i
およびJ
に変換されI
ます。u
そしてU
言葉の初めにに変換されますv
とV
、それぞれ。v
とV
単語の先頭以外の場所u
でU
それぞれに変換されます。s
ſ
単語の終わりまたは前に別のがない限り、(U + 017F)に変換されs
ます。
スペック
- 単語は、で一連の文字として定義され
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
ます。 - すべての単語には少なくとも2つの文字が含まれます。
- 入力は、印刷可能なASCII文字(U + 0020-U + 007E)のみで構成されます。
- 連続して2つ以上発生することはありません
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バイトとしてカウントできますか?
Super-vise
になりますかSuper-viſe
?