Lab 0 (Year 2 Sem 2)

Lab 0 is the first lab in semester 2 of year 2, and the 14th lab in the total of year 2. It is an introduction to problem solving in computing, and is considered to be easy.

Description
No description was provided for this lab.

Question
Question 1: (Not-so-) Random Number Generator

Let us start the journey with a game.

The purpose of this game is to make sure you have access to this module on Coursemology.

Coursemology has generated a number,, between 0 and 1000, both inclusive, which is not made known to you directly. You are going to guess it based on the feedback of the public test case. This number will be changed every 10 minutes, ie, the 10th minute, the 20th minute, the 30th minute etc of every hour. You only have 10 minutes to solve it or restart again.

How do you attempt this game?


 * 1) In the codebox, you can change the value of   and then click the "submit" button below the code box.
 * 2) If   > , then you will see the error message "Your code fails one or more public test cases."
 * 3) If   < , then you will see the error message "Your code fails one or more private test cases."
 * 4) If   == , then you will not see any error message but see a button "Finalise Submission". Please click "Finalise Submission" within that 10 minutes interval. otherwise, you may have to start again.

Remarks:


 * 1) [for 2021], this is a new question, We seek your understanding if the setting is not perfect. If you have any feedback, you can leave a message in the forum.
 * 2) During testing, 3 minutes is more than enough. However, Coursemology may have a mood swing or slight delay, which is beyond our control. Please manage your emotion first before starting the question.

Solution
This is like Year 1 Sem 2 Challenge 1. Use binary search to solve this problem.