>>698
http://codepad.org/pfBCZWvD

import Data.List
import Data.Ratio

gameRes = [(3,0),(1,1),(0,3)]
results = [[a,b,c,d] |
ab <- gameRes, ac <- gameRes, ad <- gameRes,
bc <- gameRes, bd <- gameRes, cd <- gameRes,
let a = sum [fst ab,fst ac,fst ad],
let b = sum [snd ab,fst bc,fst bd],
let c = sum [snd ac,snd bc,fst cd],
let d = sum [snd ad,snd bd,snd cd]
]
posOf0GoFinal result = let
p = head result
fstPt = head $ reverse $ sort $ result
nFsts = length $ filter (==fstPt) result
sndPt = head $ tail $ reverse $ sort $ result
nSnds = length $ filter (==sndPt) result
in
case True of
_| nFsts >= 2 && p >= fstPt -> 2%(fromIntegral nFsts)
| nFsts >= 2 && otherwise -> 0%1
| p == fstPt -> 1%1
| p == sndPt ->1%(fromIntegral nSnds)
| otherwise -> 0%1

question1 = id
$ map ((*(1%( length $ results))).fromInteger)
$ map sum
$ transpose
$ map sort
$ results

question2 = [ (pt,totalPosOf0GoFinal / nCases)|
pt <-[0..9],
let suitCases = filter ((== pt).head) results,
let nCases = fromIntegral $ length suitCases,
let totalPosOf0GoFinal = sum $ map posOf0GoFinal suitCases,
nCases /= 0
]

main = do
print question1
print question2

[1073 % 729,779 % 243,127 % 27,4825 % 729]
[(0,0 % 1),(1,0 % 1),(2,1 % 81),(3,17 % 216),(4,44 % 81),(5,80 % 81),(6,79 % 81),(7,1 % 1),(9,1 % 1)]