#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #define REP(i,a,b) for(i=a;i> N >> K; if(N % (K+1) == 1) { puts("0"); cin >> rep; n = K+1; while(n < N) { cout << n << endl; n += K+1; cin >> rep; if(rep >= N) break; } } else { n = N % (K+1) - 1; while(n < N) { cout << n << endl; n += K+1; cin >> rep; if(rep >= N) break; } } return 0; }