1 #include<stdio.h> 2 #define mod 1000000007 3 #define LL long long 4 LL ppow(LL x,LL n) 5 { 6 LL tp=1; 7 while(n) 8 { 9 if(n&1) tp=tp*x%mod; 10 n>>=1; 11 x=x*x%mod; 12 } 13 return tp; 14 } 15 int main() 16 { 17 int ca=1,T; 18 scanf("%d",&T); 19 LL n; 20 while(ca<=T) 21 { 22 scanf("%lld",&n); 23 printf("Case #%d: %lld\n",ca++,(n*ppow(2,n-1))%mod); 24 } 25 return 0; 26 }