/* -*- coding: utf-8 -*- * * 2357.cc: No.2357 Guess the Function - yukicoder */ #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ int query(int x) { printf("? %d\n", x); fflush(stdout); int r; scanf("%d", &r); return r; } /* main */ int main() { int r0 = query(100); int a, b; if (r0 == 99) { a = 99, b = 100; } else { int r1 = query(99 - r0); b = r1 + 1; a = r0 - 100 % b; if (a < 0) a += b; } printf("! %d %d\n", a, b); fflush(stdout); return 0; }