#include #include #include #include #include #include #include #include #include #define L64 long long #define MOD (1000000007LL) int main(void) { int all0, retnum; char retstr[100]; // std::string retstr; std::cout << "0000000000" << std::endl; std::cin >> all0 >> retstr; if(all0 == 10){ return 0; } int result[10]; for (int i = 1; i <= 10; i++){ for(int k = 1; k <= 9; k++){ for (int j = 1; j < i; j++){ std::cout << "0"; } std::cout << k; for (int j = i + 1; j <= 10; j++){ std::cout << "0"; } std::cout << std::endl; std::cin >> retnum >> retstr; if(retnum == 10){ return 0; } else if(all0 < retnum){ result[i - 1] = k; break; } else if(retnum < all0){ result[i - 1] = 0; break; } } } for (int i = 0; i < 10; i++){ std::cout << result[i]; } std::cout << std::endl; std::cin >> retnum >> retstr; }