sum [1..100] ^ 2 - foldl1 (\acc x -> acc + x^2) [1..100]
2 * foldl (\acc x -> acc + (x * sum [x+1..100])) 0 [1..100]
2 * fst $ foldl (\(ans, total) x -> (ans + x * total, total + x)) (0, 0) [100,99..0]
2 * fst (foldl (\(ans, total) x -> (ans + x * total, total + x)) (0, 0) [100,99..0])