why i am getting wroung ans

question - Contest Page | CodeChef

why i am getting error

my solution -

#include
#include <math.h>
#include
#include
using namespace std;

int main()
{
int t;
cin >> t;
while (t–){
deque d {};
int x, m ,check;
cin >> x>> m;
while(x != 0){
d.push_front(x%10);
x = x / 10;
}
for (int &i:d){
for (int j {1};j<m;j++){
i = i * i;
}
check = i;
if (check % 10 != 0){
i = check % 10;
}
else
i = check;
}
reverse(d.begin(),d.end());
int size = d.size();
int store = 0;
auto it = d.begin();
for(size_t i:d){
store = (store + i)*10;
}
store = store / 10;

    if (store % 7 == 0 )
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;
    
}
return 0;

}

bro we cant able to open question