Task
Take in 3 inputs. The length of the wall, the height of the wall and the coverage of the paint. Output how many tins of paint are required.
Output
Since there's no way to purchase 1/3
tin of paint, you'll need to round the amount of paint tins up to the nearest integer.
Assumptions/Stipulations
- Only 1 coat of paint is required
- Round up in terms of paint tins required
Test Cases
Length: 20 meters | Height: 7 meters | Coverage: 12 meters = 12 tins of paint
Input | Output |
---|---|
1/1/10 |
1 |
5/5/10 |
3 |
2/3/8 |
1 |
5/8/8 |
5 |
45/5/18 |
13 |
20/7/12 |
12 |
1/1/1 |
1 |
200/10/14 |
143 |
Current Winners! (28th November 2023)
Jelly - 3 bytes - Jonathan Allan https://codegolf.stackexchange.com/a/267131/91342
Uiua - 3 bytes - chunes https://codegolf.stackexchange.com/a/267109/91342
Vyxal 3 - 3 bytes - Nick Kennedy https://codegolf.stackexchange.com/a/267138/91342
APL - 3 bytes - Tbw https://codegolf.stackexchange.com/a/267134/91342
Vyxal - 3 bytes - Iyxal https://codegolf.stackexchange.com/a/267112/91342