public class Seventh { public static void main(String[] args){ double x=0,a=1,b=9; while(x!=a*a-100&&x!=b*b-268){ x++; a=Math.floor(Math.sqrt(x+100)); // System.out.println(a); b=Math.floor(Math.sqrt(x+268)); // System.out.println(b); } System.out.println(x); } }