#include<stdio.h>
#define N 1000000007
__int64 quickpow(int a,int b) {
__int64 ans=1,base=a;
while(b) {
if(b&1) {
ans=ans*base%N;
}
base=base*base%N;
b>>=1;
}
return ans;
}
int main() {
int T;
scanf("%d",&T);
while(T--) {
int n;
scanf("%d",&n);
__int64 t;
t=quickpow(2,n-1)-1;
printf("%I64d\n",t);
}
return 0;
}
[http://acm.hdu.edu.cn/showproblem.php?pid=5363](http://acm.hdu.edu.cn/showproblem.php?pid=5363)