import java.io.*; import java.util.*; public class Prob2{ static int[][]array; static int n; static int s; static int size; static int size2; static String filename = "DATA21.txt"; static FileInputStream fis; static DataInputStream dis; public static void readIn(){ try{ n = Integer.parseInt(dis.readLine()); s = Integer.parseInt(dis.readLine()); size = (int)(Math.sqrt(n)); size2 = (int)(Math.sqrt(s)); array = new int [size][size]; for(int i=0; i high) high = addSquare(i,j); } } ans[z] = high; } String file = "OUT21.txt"; FileOutputStream fos; PrintWriter p; fos = new FileOutputStream(file); p = new PrintWriter(fos); for (int i = 0; i < 5; i++){ p.println(ans[i]); } p.close(); } }