Python-四捨五入

四捨五入

Decimal 例題 自分で実装する 例題 参考記事 Decimaldecimal --- 十進固定及び浮動小数点数の算術演算 — Python 3.10.6 ドキュメント例題B - Broken Rounding from decimal import Decimal, ROUND_HALF_UP X, K = map(int, input().split()) for i in range(…