#GHOME - Editorial

# PROBLEM LINK:

*Author:* Shivam Chauhan

*Tester:* Shivam Chauhan

*Editorialist:* Shivam Chauhan

# DIFFICULTY:

SIMPLE

# PROBLEM:

The problem states that we have to cover a m*n sq. units of floor with 2*1 sq. units of tile. How many

tiles we need to do so?

# QUICK EXPLANATION:

Simple, we can find the number of tiles needed by diving the total area of floor by area of one tile.

# EXPLANATION:

By using some high school mathematics, we can find out that number of tiles are total area of floor

divided by total area of one tile. Now total area of floor is m*n sq. units and total area of one tile is 2*1

sq units or simply 2 sq. units. Now the formula generalizes to (m*n)/2. But as the output should be an
integer and there are many possibilites when (m*n) becomes odd thus resulting to an additional 0.5 to

the answer we need to take ceil of it. The best way to take ceil is to simply add 1 to (m

*n) and the divide*

by 2 like this, (mn+1)/2.

by 2 like this, (m