0

[Solved] Canvas Cost! Two test cases fail.

canvas_brushes=40 tax=(10/100) color_cost=5*(int(input())) cost=int(canvas_brushes+color_cost) total=int((cost*tax)+cost) print (total)

12/25/2019 9:00:28 AM

Subham

4 Answers

New Answer

+1

total=math.ceil((cost*tax)+cost)

+1

Try to use ceil instead of int from math import ceil canvas_brushes=40 tax=(10/100) color_cost=5*(int(input())) cost=int(canvas_brushes+color_cost) total=ceil((cost*tax)+cost) print (total)

+1

Int sometimes rounds number to lower value, but you need to round it to upper value

+1

int() doesn't round any thing. It only cuts the decimals.