import java.math.BigDecimal;
import java.math.RoundingMode;
class RoundNumber {
BigDecimal Price2
= Price.
divide(Tick,
9, RoundingMode.
HALF_EVEN).
setScale(0, RoundingMode.
HALF_UP).
multiply(Tick
); System.
out.
println("Price: " + Price
+ ", Round: " + Tick
+ ", Converted: " + Price2
); }
}
aW1wb3J0IGphdmEubWF0aC5CaWdEZWNpbWFsOwppbXBvcnQgamF2YS5tYXRoLlJvdW5kaW5nTW9kZTsKY2xhc3MgUm91bmROdW1iZXIgewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgdGhyb3dzIEV4Y2VwdGlvbiB7CiAgICAgICAgIEJpZ0RlY2ltYWwgUHJpY2UgPSBuZXcgQmlnRGVjaW1hbCgiMjMyLjMzMTUiKTsKICAgICAgICAgQmlnRGVjaW1hbCBUaWNrID0gbmV3IEJpZ0RlY2ltYWwoIjEwLjAiKTsKICAgICAgICAgQmlnRGVjaW1hbCBQcmljZTIgPSBQcmljZS5kaXZpZGUoVGljaywgOSwgUm91bmRpbmdNb2RlLkhBTEZfRVZFTikuc2V0U2NhbGUoMCwgUm91bmRpbmdNb2RlLkhBTEZfVVApLm11bHRpcGx5KFRpY2spOwogICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4oIlByaWNlOiAiICsgUHJpY2UgKyAiLCBSb3VuZDogIiArIFRpY2sgKyAiLCBDb252ZXJ0ZWQ6ICIgKyBQcmljZTIpOwogICAgfQp9