>>373
多少技巧的だけど見た目にはキレイ
haskell

ofoff x = case ( take 3 $ x ++ ( " " ) ) of
" " -> [ ]
"OFF" -> "OFF" : ( ofoff $ drop 3 x )
_ -> "OF" : ( ofoff $ drop 2 x )

main = print $ ofoff "OFOFOFFOFOFFOFOFF"