You are viewing a single comment's thread. Return to all comments →
//THis code clear all test cases
static String solve(int d, int k)
{ long count=0; for(long i=0;i<Math.sqrt(d);i++) { long p=(long)Math.sqrt((long)d-i*i); if((p*p+i*i)==d) { count+=4; } } if(k>=count) { return "possible"; } return "impossible"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Circle City
You are viewing a single comment's thread. Return to all comments →
//THis code clear all test cases
static String solve(int d, int k)