September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,6 +1,18 @@
|
|||
import Data.List (permutations)
|
||||
print [ ("Baker lives on " ++ show b
|
||||
, "Cooper lives on " ++ show c
|
||||
, "Fletcher lives on " ++ show f
|
||||
, "Miller lives on " ++ show m
|
||||
, "Smith lives on " ++ show s) | [b,c,f,m,s] <- permutations [1..5], b/=5,c/=1,f/=1,f/=5,m>c,abs(s-f)>1,abs(c-f)>1]
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
print
|
||||
[ ( "Baker lives on " ++ show b
|
||||
, "Cooper lives on " ++ show c
|
||||
, "Fletcher lives on " ++ show f
|
||||
, "Miller lives on " ++ show m
|
||||
, "Smith lives on " ++ show s)
|
||||
| [b, c, f, m, s] <- permutations [1 .. 5]
|
||||
, b /= 5
|
||||
, c /= 1
|
||||
, f /= 1
|
||||
, f /= 5
|
||||
, m > c
|
||||
, abs (s - f) > 1
|
||||
, abs (c - f) > 1 ]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue