package LESSION.Test;
import java.util.Arrays;
public class J0103 {
public static void main(String[] args) {
for (int i = 0; i < 100; i++){
int a = i*i*i;
int b = i*i*i*i;//
if (String.valueOf(a).length() == 4 && String.valueOf(b).length() == 6) {
String combined = String.valueOf(a) + String.valueOf(b);
if (combined.length() == 10) {
char[] digits = combined.toCharArray();
Arrays.sort(digits);
boolean valid = true;
for (char c = '0'; c <= '9'; c++) {
if (Arrays.binarySearch(digits, c) < 0) {
valid = false;
break;
}
}
if (valid) {
System.out.println("His age is: " + i);
}
}
}
}
}
}