题解 | #取近似值#
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
from decimal import Decimal def main(): a = input() b = Decimal(a).quantize(Decimal("1"), rounding="ROUND_HALF_UP") print(b) main()
取近似值
https://www.nowcoder.com/practice/3ab09737afb645cc82c35d56a5ce802a
from decimal import Decimal def main(): a = input() b = Decimal(a).quantize(Decimal("1"), rounding="ROUND_HALF_UP") print(b) main()
相关推荐