#P10425. [蓝桥杯 2024 省 B] R 格式
[蓝桥杯 2024 省 B] R 格式
Problem Description
Xiao Lan has recently been studying a way to represent floating-point numbers: the format. For a floating-point number greater than , it can be represented by an integer in format. Given a conversion parameter , the method to convert the floating-point number into an -format integer is as follows:
- Multiply the floating-point number by .
- Round to the nearest integer.
Input Format
One line containing an integer and a floating-point number .
Output Format
Output one line containing one integer, representing the value of in format.
2 3.14
13
Hint
Sample 1 Explanation
, which becomes after rounding.
Constraints
Let be the length of when is treated as a string.
- For of the testdata, it is guaranteed that and .
- For all testdata, it is guaranteed that and , and is a decimal number, meaning it contains a decimal point.
Translated by ChatGPT 5