问题:超时
#include<stdio.h>
#include<math.h>
int main()
{
int n;
scanf("%d",&n);
while(n–)
{
int k;
scanf("%d",&k);
int i,j;
int count=0;
int first;
for(i=pow(2,k-1);i<pow(2,k);i++)
{
first=i;
for(j=k-1;j>=0;j–)
{
if(first/(int)pow(2,j)==1&&first)
{
count+=1;
first-=(int)pow(2,j);
}
}
}
printf("%d\n",count);
}
return 0;
}