We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Each time a piece of paper is cut it becomes 2 pieces, adding 1 to the total number of pieces. Therefore to make x pieces from 1 piece there needs to be x-1 cuts, so the final answer is (n*m)-1.
Interestingly, this principle means that the cuts can be made in any order and configuration.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cutting Paper Squares
You are viewing a single comment's thread. Return to all comments →
Each time a piece of paper is cut it becomes 2 pieces, adding 1 to the total number of pieces. Therefore to make x pieces from 1 piece there needs to be x-1 cuts, so the final answer is (n*m)-1.
Interestingly, this principle means that the cuts can be made in any order and configuration.