プログラミングのお題スレ Part22 (857レス)
前次1-
抽出解除 必死チェッカー(本家) (べ) 自ID レス栞 あぼーん

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
360: デフォルトの名無しさん [] 2024/06/07(金) 23:24:01.54 ID:KUK95Vnh(1) AAS
Haskell
範囲外の数値は平文字をそのまま返すこととした。

import Data.Char

cearsar n |(-26) <= n && n <= 26 = map (f n)
where
f x = chr.(+x).ord
cearsar _ = cearsar 0

sample:
ghci> cearsar 50 "Hello, World!"
"Hello, World!"
ghci> cearsar 3 "Hello, World!"
"Khoor/#Zruog$"
ghci> cearsar (-3) "Khoor/#Zruog$"
"Hello, World!"
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ AAサムネイル

ぬこの手 ぬこTOP 0.030s