ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1300. Taxes

rounding in python is easy
Posted by yyll 28 May 2022 13:02
You can just do calculations with floats as much as possible, e.g., 15% = 0.15, binary search with epsilon = 0.0001.

Rounding with round(x, 2) are needed only when:
 1. K*L
 2. output of T(K)
-- "The calculation of the regional coefficient and all kinds the taxes is made with rounding off to two digits after a decimal point."

while K itself is float.