There is a function
calulate
the first line contains a positive integer T,means the number of the test cases.
next T lines there is a number N
only
1 3
2 $1^2-3*1+2=f(1)=0$ $2^2-3*2+2=f(2)+f(1)=0->f(2)=0$ $3^2-3*3+2=f(3)+f(1)=2->f(3)=2$ $f(1)+f(2)+f(3)=2$