LCC '18 Contest 4 J3 - Minecraft Construction Contractor

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

Junyi is a Minecraft home designer, who is widely sought after for his straightforward rectangular designs. To construct a house, he builds a rectangular room with 4 walls and 1 roof. Additionally, to construct all his houses, he uses diamond blocks, which are crafted using 9 diamonds. When Junyi mines, he finds diamonds at a rate of 32 per hour. He only mines for full hours at a time, so he will sometimes return with extra diamonds.

Given the house dimensions a customer gives Junyi, can you calculate how many hours Junyi must mine in order to get enough diamonds to complete the house?

Input Specification

The first and only line of input will contain three space-separated integers, L, W, H, representing the length, width and height, respectively, of the house.

Output Specification

The minimum integer number of hours Junyi must mine for in order to craft the number of blocks needed to construct his customer's house.

Constraints

L, W (3 \le L, W \le 10^3)

H (2 \le H \le 256)

Sample Input

32 20 15

Sample Output

574

Comments

There are no comments at the moment.