标签:
#include<stdio.h>
const int max =1000000;
long long kuaimi(int n)
{
long long temp=1;
long long a=2;
while(n>0)
{
if(n&1)
temp=((temp*a)%max);
a=((a*a)%max);
n>>=1;
}
return temp;
}
int main()
{
int num;
scanf("%d\n",&num);
while(num--)
{
int m;
scanf("%d",&m);
printf("%d\n",kuaimi(m)-1);
}
}
标签:
原文地址:http://www.cnblogs.com/mycapple-zgs-111411/p/4619725.html