https://atcoder.jp/contests/arc218/tasks/arc218_a
一种选法里有 \(d\) 个不同数,可看作这 \(d\) 个数对答案各贡献 \(1\)。对每个数统计不包含它的选法数即可。