Project Euler Problem 030
z :: [Integer] z=[0..9] -- 9^5が6つあっても100万いかないので6桁に収まる -- [0,1,4150,4151,54748,92727,93084,194979] go :: Integer go = 5 w :: [Integer] w = [x | a<-z,b<-z,c<-z,d<-z,e<-z,f<-z,let x=100000*f+10000*a+1000*b+100*c+10*d+e,x==a^go+b^go+c^go+d^go+e^go+f^go] ans1 :: Integer ans1 = (sum w)-1 --443839 main :: IO () main = print ans1