Skip to content

Commit

Permalink
solution
Browse files Browse the repository at this point in the history
  • Loading branch information
sabira-khan committed May 5, 2022
1 parent 50779fc commit 4050014
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions JavaSolutions/src/com/gitproject/Beecrowd2867_uri.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.gitproject;

import java.math.BigInteger;
import java.util.Scanner;

public class Beecrowd2867_uri {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();

while (t-- > 0) {
int n = s.nextInt();
int m = s.nextInt();
BigInteger x = new BigInteger(String.valueOf(n));
BigInteger z = x.pow(m);
int l = z.toString().length();

System.out.println(l);
}
}
}

0 comments on commit 4050014

Please sign in to comment.