
23 Jul
2013
23 Jul
'13
6:41 a.m.
Hi, all Below is my solution to SPOJ->Polybius squarehttp://www.spoj.com/problems/POLYBIUS Please try to shorten it: *import Data.Maybe* *d=[1..5]* *f s=unwords$map(\c->fromJust$lookup c((' ',""):('J',"24"):zip(['A'..'I']++['K'..'Z'])[show(x+10*y)|y<-d,x<-d]))s* *main=getLine>>(interact$unlines.map f.lines)* Thanks, Nadav