#R1014. [KBC001F] Class
[KBC001F] Class
Problem Statement
Little A is starting school! The first class he has is a math class. During the class, the teacher gave him a difficult problem:
Given a sequence , it is known that:
$a=\{\text{Round}(\sqrt{2},N),\text{Round}(\sqrt{3},N),\text{Round}(\sqrt{4},N),\cdots,\text{Round}(\sqrt{K},N)\}$
Here, represents rounding to decimal places.
Given , find:
- The sum of the number of occurrences of the decimal part in each element of this sequence.
- The sum of the digits of the decimal part in each element of this sequence.
Constraints
Input Format
The input is given from Standard Input in the following format:
$\color{#cccccc}\boxed{\color{white}{\large{|}}\color{black}N\ \ K\ \ X\color{white}{\large{|}}}$
Output Format
The output consists of two lines:
- The first line is the sum of the number of occurrences of the decimal part in each element of the sequence.
- The second line is the sum of the digits of the decimal part in each element of the sequence.
Sample Input 1
2 5 4
Sample Output 1
2
21
$\sqrt2\approx1.41,\sqrt3\approx1.73,\sqrt4=2,\sqrt5\approx2.24$.
.