Created
February 11, 2019 14:34
-
-
Save maxsu/abdc8ffd40e2c8bda03a5890303c51d8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t = [0..9] | |
t8 = [(a,b,c,d,e,f,g,h) | a<-t,b<-t,c<-t,d<-t,e<-t,f<-t,g<-t, h<-t] | |
f::(Integer, Integer, Integer, Integer,Integer, Integer, Integer, Integer) -> Bool | |
f (a,b,c,d,e,f,g,h) = | |
a^h + b^g + c^f + d^e + e^d + f^c + g^b + h^a == 10^8*h + 10^7*g + 10^6*f + 10^5*e + 1000*d + 100*c + 10*b + a | |
s = filter f t8 | |
main = print s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment