26 lines
507 B
Java
26 lines
507 B
Java
package chelper;
|
|
|
|
import io.InputReader;
|
|
import io.OutputWriter;
|
|
import misc.SimpleSavingChelperSolution;
|
|
|
|
|
|
public class HS08TEST extends SimpleSavingChelperSolution {
|
|
|
|
public void solve(int testNumber, InputReader in, OutputWriter out) {
|
|
wrapSolve(testNumber, in, out);
|
|
}
|
|
|
|
@Override
|
|
public void solve(int testNumber) {
|
|
int x = in.nextInt();
|
|
double y = in.nextDouble();
|
|
|
|
if (x + 0.5 > y || x % 5 != 0) {
|
|
out.println(y);
|
|
} else {
|
|
out.println(y - x - 0.5);
|
|
}
|
|
}
|
|
}
|