import java.io.*; import java.math.BigInteger; public class prob63 { public prob63() { } public static void main (String [] args) { int i,j,count=0; for (i = 1; i < 100; i++) { for (j = 1; j < 100; j++) { BigInteger result = new BigInteger("" + i); result = result.pow(j); String r = result.toString(); if (r.length() == j) count++; } } System.out.println("Total: " + count); } }