Given positive integers n, P1, P2, …Pn and two sets
B={(a1,a2,…,an)∣ai=0∨1,∀i∈N},S={(x1,x2,…,xn)∣1≤xi≤Pi∧xi∈N,∀i∈N}
A function f:S→Z is called Real, if and only if for any positive integers (y1,y2,…,yn) and positive integer a which satisfied 1≤yi≤Pi−a∀i∈N, we always have:
\begin{align*}
\sum_{(a_1,a_2,…,a_n) \in B \wedge 2| \sum_{i=1}^na_i}f(y+a \times a_1,y+a \times a_2,……,y+a \times a_n)&>\\
\sum_{(a_1,a_2,…,a_n) \in B \wedge 2 \nmid \sum_{i=1}^na_i}f(y+a \times a_1,y+a \times a_2,……,y+a \times a_n)&.
\end{align*}
Find the minimum of ∑i1=1P1∑i2=1P2....∑in=1Pn∣f(i1,i2,...,in)∣, where f is a Real function.Proposed by tob8y