#include using namespace std; int main(){ unsigned int a, b, xo, n; unsigned int i, tk_b=0, tk_w=0, ak_b=0, ak_w=0, tk=0, ak=0; //vector tkh(n); //vector tkh(n); unsigned int m = pow(2, 32); cin >> a >> b >> xo >> n; xo = a*xo + b; xo = xo %m; for(i=0; i