D - I Hate Non-integer Number (atcoder.jp)
Problem Statement
You are given a sequence of positive integers A(a1,…,aN) of length N. There are (2N−1) ways to choose one or more terms of A. How many of them have an integer-valued average? Find the co…