Getting error in the practice challenge

i have compiled this code again and again but I am not getting the right answer. can you help me fix it?
#include
using namespace std;
int main()
{
int n;
cin>>n;
int a[64]={0};
int x;
for(int i=0;i<n;i++)
{
cin>>x;
int j=0;
while(x>0)
{
int last_bit=x&1;
a[j]+=last_bit;
j++;
x>>1;
}
}
int p=1;
int ans=0;
for(int i=0;i<64;i++)
{
a[i]%=3;
ans+=a[i]p;
p=p
2;
}
cout<<ans;
return 0;
}

hello @jindaldivish
please save ur code here-> https://ide.codingblocks.com/
and share the link with me.

image
here it should be
x=x>>1;

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.