P27895 [洛谷] [Language Month Competition 202312] Flexible Scoring
普及-
题目描述

Problem Background

Time travels back to 2014, when T Elementary School is holding its final exams. You are a student named Xiao Fentu, participating in the final exam for a certain subject. The subject is scored out of 100 points.

Problem Description

However, due to the difficulty of the exam paper, the teacher announced that the subject will adopt a "square root times ten" scoring strategy. Specifically, if the score on the paper is \( x \) points, then the final score on the report card will be \( \left \lfloor 10 \sqrt{x} \right \rfloor \) points.

Hint: For a non-negative number \( x \), \( \sqrt{x} \) represents the arithmetic square root of \( x \). If a non-negative number \( y \times y = y^2 = x \), then \( y = \sqrt{x} \). For example, \( \sqrt{9} = 3 \).
Hint: \( \left \lfloor x \right \rfloor \) represents the largest integer less than or equal to \( x \). For example, \( \left \lfloor 4.2 \right \rfloor = 4 \).

It is known that both the exam paper score and the report card score are always integers. For this exam, Xiao Fentu's homeroom teacher requires his report card score to be at least \( a \) points. Since Xiao Fentu is a genius and can control his paper score at will, he wants to challenge himself to achieve the report card score of \( a \) points with the least paper score.

Now he wants to know what this minimum paper score is.

Formally, given a non-negative integer \( a \), you need to find the smallest non-negative integer \( x \) such that \( \left \lfloor 10 \sqrt{x} \right \rfloor \geq a \).

Input Format

The input consists of a single line containing an integer \( a \), representing the minimum score required by the teacher on Xiao Fentu's report card.

Output Format

The output consists of a single line containing an integer, representing the minimum paper score Xiao Fentu needs to achieve the required score.

Sample Input and Output

Sample Input #1

60

Sample Output #1

36

Sample Input #2

43

Sample Output #2

19

Notes

Sample 1 Explanation

It is easy to find that \( 10 \sqrt{35} \approx 59.16 \), \( \left \lfloor 10 \sqrt{35} \right \rfloor = 59 \), and \( 10 \sqrt{36} = 60 \). Therefore, Xiao Fentu needs to score at least 36 points.

Data Range and Constraints

For 100% of the data, \( 0 \leq a \leq 100 \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
60
样例输出
36