I have two types of notebook .
10 problems could be solved in one page, in the first notebook.
12 problems could be solved in one page, in the second notebook.
For given n problems I have to use pages in such a way that no space from both notebook should be wasted ever . Taking consideration that I have to use minimum pages also . Output should return number of pages need for solving all problem , if not passible it should return -1.
Problem count : 10 Output : 1 (one page from first notebook) Problem Count :12 Output :1 (one page from second notebook) Problem Count : 5 Output : -1 (Not possible) Problem Count : 22 Output : 2(one from first notebook + one from second notebook) Problem Count: 23 Output:-1(not possible)