import java.util.List;
import java.util.Arrays;
import java.util.function.IntPredicate;
import java.util.function.BiConsumer;
import java.util.stream.IntStream;
class KaprekarNumbers {
public static void main
(String[] args
) { List
<List
<Integer
>> inputs
= Arrays.
asList( );
IntPredicate isKaprekarNumber = x -> {
return sqrd.
length() > 1 && (Integer.
parseInt(sqrd.
substring(0, sqrd.
length() / 2)) + Integer.
parseInt(sqrd.
substring(sqrd.
length() / 2))) == x
; };
BiConsumer
<Integer, Integer
> printKaprekarInRange
= (low, high
) -> IntStream.
range(low, high
+ 1).
filter(isKaprekarNumber
).
forEach(x
-> System.
out.
print(x
+ " "));
inputs.forEach(cur -> {
printKaprekarInRange.accept(cur.get(0), cur.get(1));
});
}
}
aW1wb3J0IGphdmEudXRpbC5MaXN0OwppbXBvcnQgamF2YS51dGlsLkFycmF5czsKaW1wb3J0IGphdmEudXRpbC5mdW5jdGlvbi5JbnRQcmVkaWNhdGU7CmltcG9ydCBqYXZhLnV0aWwuZnVuY3Rpb24uQmlDb25zdW1lcjsKaW1wb3J0IGphdmEudXRpbC5zdHJlYW0uSW50U3RyZWFtOwpjbGFzcyBLYXByZWthck51bWJlcnMgewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoJCUxpc3Q8TGlzdDxJbnRlZ2VyPj4gaW5wdXRzID0gQXJyYXlzLmFzTGlzdCgKCQkJQXJyYXlzLmFzTGlzdCgyLCAxMDApLAoJCQlBcnJheXMuYXNMaXN0KDEwMSwgOTAwMCkKCQkpOwoJCQoJCUludFByZWRpY2F0ZSBpc0thcHJla2FyTnVtYmVyID0geCAtPiB7CgkJCVN0cmluZyBzcXJkID0gSW50ZWdlci50b1N0cmluZygoaW50KSBNYXRoLnBvdyh4LCAyKSk7CgkJCXJldHVybiBzcXJkLmxlbmd0aCgpID4gMSAmJiAoSW50ZWdlci5wYXJzZUludChzcXJkLnN1YnN0cmluZygwLCBzcXJkLmxlbmd0aCgpIC8gMikpICsgSW50ZWdlci5wYX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