PLZ help me out
I am getting the wrong answer and cannot point out my mistake.
#include<bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin>>t;
for(int i=1;i<=t;i++)
{
int n;
cin>>n;
long long int sum=0;
for(int j=0;j<n;j++)
{
int a;
cin>>a;
sum=(sum+a)%100000007;
}
long long int ans=((1<<(n-1))*sum)%100000007;
cout<<"Case “<<i<<”: "<<ans<<endl;
}
}
Sorry I put the previous code