#include #include using namespace std; int calc(int w,string s){ int tmp=0; for(int i=0;i>N>>M; n=N[N.size()-1]-'0'; int c; if(M=="0") cout<<"1"<