DMOPC '14 Contest 1 P2 - Tiles

View as PDF

Submit solution

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

Problem type

One day Mr. Sidhu's students are talking too much (as usual) and so he decides to give them a task that might quiet them down for a bit.

He tells them the width and length of the classroom (first line of input) as well as the side length of a standard square tile (second line of input). None of these dimensions will be less than 1 or greater than 1000.

You may assume that they are of the same unit. What is the maximum number of entire tiles that can fit within the classroom's surface? The tiles can only be axially aligned (sides parallel to the sides of the room).

Sample Input

10 5

Sample Output



  • -36
    Anix55  commented on Oct. 20, 2015, 4:32 a.m. edited

    This comment is hidden due to too much negative feedback. Show it anyway.

    • 36
      snowblind  commented on Oct. 20, 2015, 7:58 p.m.

      you can only fit 3 whole tiles without breaking them