blob: c6558c625b0b475793fd18ecbbc2b2e0a82168e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
{-# LANGUAGE UnicodeSyntax #-}
module Main (main) where
import T2902_B_PairingSum
f :: Int -> PSum Int Int
f n = unions $ fmap g [1..n]
where
g m = unions $ fmap fromList
[ zip [m..n] $ repeat 1
, zip [m,2+m..n] $ repeat 2
, zip [m,3+m..n] $ repeat 3
]
main ∷ IO ()
main = print $ take 20 $ toList $ f 20
|