#P1517. Precise Power Calculation

    ID: 14803 Type: Default 1000ms 256MiB

Precise Power Calculation

Precise Power Calculation

Given a real number \(R\) and an integer \(n\), compute the exact value of \(R^n\). Here, \(R\) is a real number satisfying \(0.0 < R \leq 9999.9\) and \(n\) is an integer satisfying \(0 < n \leq 250\). The answer must be computed exactly and printed without any extraneous leading or trailing zeros. In particular, if the result is an integer, the decimal point should not appear; otherwise, trailing zeros after the decimal point must be removed.

Note: The result may contain very many digits, so you must use arbitrary precision arithmetic.

Input Format: A single line containing \(R\) and \(n\), separated by whitespace.

Output Format: A single line that contains the exact value of \(R^n\) formatted as described.

inputFormat

The input contains one line with a real number \(R\) and an integer \(n\), separated by spaces.

For example:

95.00 2

outputFormat

Output the exact value of \(R^n\) after removing any unnecessary leading or trailing zeros. Do not output a decimal point if the answer is an integer.

For example, for the sample input above, the output should be:

9025

sample

95.00 2
9025