#include #include #include using namespace std; string zero = "0000000000"; int challenge(int change_point, int change_number){ zero[change_point] = change_number + '0'; cout << zero << endl; zero = "0000000000"; int reply; string if_locked; cin >> reply >> if_locked; if(reply == 10){ exit(0); }else{ return reply; } } int main(){ string ans = " "; for(int i = 0; i < 10; i++){ int normal = min(challenge(i, 0), challenge(i, 1)); for(int j = 0; j < 10; j++){ if(challenge(i, j) != normal){ ans[i] = j + '0'; break; } } } cout << ans << endl; }