Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Monday, Dec 7.Claim the deal

A server holds a secret integer between 1 and upperBound, inclusive. You are given upperBound and a GuessServer, but you cannot read the secret directly. Submit an integer guess by calling String check(int guess).

Feedback is delayed by one call. The first call returns "PENDING". Every later call returns feedback about the previous guess:

  • "TOO_LOW" if that guess was less than the secret.
  • "TOO_HIGH" if that guess was greater than the secret.
  • "CORRECT" if that guess matched the secret.
Stdout
-