#include #include #include int main(int argc, char *argv[]) { char input[20]; unsigned int bits_list[20*8]; unsigned int temp_array[36]; char output[4]; int x=0; int y=0; int count=0; cin >> input; for (x=0;x<4;x++) { //clears output array output[x]='0'; } for (x=0;x<20;x++) { input[x]='0'; } for (x=0;x<20;x++) { for (y=7;y>=0;y--) { bits_list[count]= input[x] >> y; count++; } } for (x=0;x<20*8;x++) { if (bits_list[x] % 2 != 0) { temp_array[x%36]++; } } for (x=0;x<4;x++) { for (y=0;y<8;y++) { if (temp_array[(x+1)*(y+1)-1]%2 == 1) { output[x]= ((y)*2) | output[x]; } } } for (x=0;x<4;x++) { cout << output[x]; } cout << endl; return 0; }