|
|
back to boardI have AC in (0.093) while (true) { int d = (int)Math.sqrt(kk); if (d*d==kk) { System.out.println(0+" "+d); return; } else { long d3 = kk-d*d; int dd = (int)Math.sqrt(d3); if (dd*dd==d3) { System.out.println(dd+" "+d); return; } } kk += p; } |
|
|