- Given two integers, n and m, how many digits does n^m have?
2 and 10 - 2^10 = 1024 => 4 digits
3 and 9 - 3^9 = 19683 => 5 digits
|The input is composed of several test cases. The first line has an integer C, representing the number of test cases.The following C lines contain two integers N and M(1 <= N, M <= 100).||For each input test case of your program, you must print an integer containing the number of digits of the result of the calculated power in the respective test case.|