#B3905. Minimum Paper Score Challenge
Minimum Paper Score Challenge
Minimum Paper Score Challenge
In this problem, the scoring strategy is modified because the exam was unusually difficult. The teacher decided to adopt a "square-root times ten" scoring system. Specifically, if the raw exam score is \( x \) points, then the score displayed on the transcript is \( \lfloor 10\sqrt{x} \rfloor \) points.
Note:
- For any non-negative number \( x \), \( \sqrt{x} \) denotes its arithmetic square root. That is, if \( y\ge0 \) and \( y \times y = x \), then \( y=\sqrt{x} \). For example, \( \sqrt{9} = 3 \).
- \( \lfloor x \rfloor \) denotes the greatest integer less than or equal to \( x \); for instance, \( \lfloor 4.2 \rfloor = 4 \).
It is given that both the raw exam score and the transcript score are non-negative integers. In particular, Xiao Fentu's class teacher demands that his transcript score must be at least \( a \) points. Being a genius, he can score any raw exam score he wishes, and now he challenges himself to achieve at least \( a \) points with the smallest possible raw exam score.
Formally, given a non-negative integer \( a \), find the smallest non-negative integer \( x \) such that \[ \lfloor 10 \sqrt{x} \rfloor \ge a. \]
inputFormat
The input consists of a single non-negative integer \( a \) representing the minimum required transcript score.
\(\textbf{Constraints}:\)
- \( 0 \leq a \leq 10^9 \)
outputFormat
Output the smallest non-negative integer \( x \) (the raw exam score) such that \( \lfloor 10\sqrt{x} \rfloor \ge a \).
sample
0
0