(UVA) Quirksome Squares - Solution 1
I used Brute Force to solve this problem. I considered only the numbers that have an exact square. Once a Quirksome Square is a number 'xyzw' where (xy+zw)^2 = xyzw, these numbers are the only possible answers. import java.io.*; import java.util.*; class Main { public static void process() throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); while (line != null) { int numDigits = Integer.parseInt(line); int div = 1; for (int i = 0; ...