### SRM 635 div 2 500

This is somehow easy comparing to other 500 point problem.

this is about a square root.

public class QuadraticLaw {

public long getTime(long time){

long number = (long)Math.floor(Math.sqrt(time));

for(long i=number; i>0; i--){

if((i * i) + i <= time){

return i;

}

}

return 0l;

}

}

this is about a square root.

public class QuadraticLaw {

public long getTime(long time){

long number = (long)Math.floor(Math.sqrt(time));

for(long i=number; i>0; i--){

if((i * i) + i <= time){

return i;

}

}

return 0l;

}

}

## Comments

## Post a Comment