#pragma GCC optimize("Ofast") #pragma GCC target("avx2") #define rd_init() char*rp=({char*mmap();mmap(0l,1l<<25,1,2,0,0ll);}) #define rd() ({long _v=0,_c;while(_c=*rp++-48,_c>=0)_v=_v*10+_c;_v;}) #define WTHI(v) {unsigned _z=v,_n=0;ulong _d=0;while(++_n,_d=_d<<8|0x30|_z%10,_z/=10);*(ulong*)wp=_d;wp+=_n;} #define WTLO(v) {unsigned _z=v,_n=8;ulong _d=0;while(_d=_d<<8|0x30|_z%10,_z/=10,--_n);*(ulong*)wp=_d;wp+=8;} #define wt(v) if(v>=100000000){if(v>=10000000000000000l){WTHI(v/10000000000000000l);WTLO(v/100000000%100000000);}else WTHI(v/100000000);WTLO(v%100000000);}else{WTHI(v);} typedef unsigned long ulong; char wbuf[1<<25]; int main(){ rd_init(); char*wp=wbuf; for(int t=rd();t--;){ ulong n=rd(); if(n&1){ *wp++='0'; }else{ ulong z=n*((n>>1)-1); wt(z); } *wp++='\n'; } write(1,wbuf,wp-wbuf); _exit(0); }