标签:style blog http color io ar div sp log
1 -- Enter your code here. Read input from STDIN. Print output to STDOUT
2 import Data.List
3 main = do
4 inputdata <- getLine
5 putStrLn . concat . map (\xs -> f (head xs) (length xs)) . group $ inputdata
6 where
7 f ch len
8 | len == 1 = [ch]
9 | otherwise = [ch] ++ show len
标签:style blog http color io ar div sp log
原文地址:http://www.cnblogs.com/Stomach-ache/p/3977844.html