Minimum number of square tiles required to fill the rectangular floor | Function to find the number of tiles ; No of tiles ; Input length and breadth of rectangle and side of square
function solve ( M , N , s ) { let ans = Math . floor ( ( ( Math . ceil ( M / s ) ) * ( Math . ceil ( N / s ) ) ) ) ; return ans ; } let N = 12 , M = 13 , s = 4 ; document . write ( solve ( M , N , s ) ) ;