**New course!**Every coder should learn

**Generative AI!**

+ 4

# [Solved] C# Paint Cost

I can't seem to solve the "Paint Cost" assignment 😐 I have used three different strategies, I read previous posts, and I think I got it all. The conversion to int. The rounding up. Still, the last one fails, even when I do the rounding myself 😐 Some help would be appreciated 🙂🤗 Here is my attempt: https://code.sololearn.com/ckjpaT94fiO7

2 Answers

+ 4

The last test case is probably just some huge value which caused an overflow in your calculations, because if I replace int by long in your tax strategies, most of them work fine now (except for the first, where the multiplication by 1.1 is not precise). The following should be working:
https://code.sololearn.com/c1poPHhKGrh3/?ref=app

+ 3

Thank you 🤗💕 Yes, I did not think of it 🤔 Let me try ... It worked 😃