need help with this problem , any slight hint is appreciated, thanks guys.

Revision en1, by Saitama_theGoat, 2025-07-18 09:52:50

Find the middle element when the numbers in an n \times n multiplication table are sorted in increasing order. It is assumed that n is odd. For example, the 3 \times 3 multiplication table is as follows:

$$$ \begin{matrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 3 & 6 & 9 \\ \end{matrix} $$$

The numbers in increasing order are [1,2,2,3,3,4,6,6,9], so the answer is 3. Input The only input line has an integer n. Output Print one integer: the answer to the task. Constraints

1 \le n < 10^6

Example Input: 3

Output: 3

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Saitama_theGoat 2025-07-18 09:52:50 601 Initial revision (published)