Sample Input and Output

Input Output Figure
15
8.9
129
8.4
5.2
39

Clarification of the examples:

In the first example, the hall length is 1500 cm. 12 rows can be situated in it (12 120 cm = 1440 + 60 cm difference). The hall width is 890 cm. 100 cm from them are for the hallway in the middle. The rest 790 cm can be situated by 11 desks per row (11 70 cm = 770 cm + 20 cm difference). Number of places = 12 * 11 - 3 = 132 - 3 = 129 (we have 12 rows with 11 working places = 132 minus 3 places for podium and entrance door).

In the second example, the hall length is 840 cm. 7 rows can be situated in it (7 120 cm = 840, no difference). The hall width is 520 cm. 100 cm from them are for the hallway in the middle. The rest 420 cm can be situated by 6 desks per row (6 70 cm = 420 cm, no difference). Number of places = 7 * 6 - 3 = 42 - 3 = 39 (we have 7 rows with 6 working places = 42 minus 3 places for podium and entrance door).

results matching ""

    No results matching ""