fork download
  1.  
  2. list = [(a,b) | s<-[1..5000 ], a<-[1..s-1], let b = s - a, (show $ a^2 + b^2 ) == ( show $ a ) ++ ( show $ b ) ]
  3.  
  4. main = print $ list
Success #stdin #stdout 2.98s 4888KB
stdin
Standard input is empty
stdout
[(10,1),(12,33),(10,100),(88,33),(990,100),(588,2353)]