//https://ncode.syosetu.com/n4830bu/305/ #include using namespace std; int main() { string ans = "0000000000"; int bef = 0; for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { string maine = ans; maine[i] = j + '0'; cout << maine << endl; int book; string s; cin >> book >> s; if (book == 10) return 0; if (book > bef) { bef = book; ans = maine; } } } }