Round and power

Report a typo

Read the integers power and mode and a big rational number. Round the number toward floor to mode decimal places, then raise it to the power of power and print the result.

Input: power, mode: Int; number: BigDecimal

Output: result: BigDecimal

Sample Input 1:

5
7
37526473596845785096598544.53653879640578

Sample Output 1:

74419847553764131971306604121955997068263667521223929875384270904246170594749834378402002773234134253669551441686239041688640731.20299303904338981602574055560375707

Sample Input 2:

2
0
67.45354675

Sample Output 2:

4489
Write a program in Kotlin
import java.math.BigDecimal
import java.math.RoundingMode

fun main() {
// write your code here

}
___

Create a free account to access the full topic