Skip to content

Latest commit

 

History

History

Split A Number into Maximum Composite Number

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Given n, print the maximum number of composite numbers that sum up to n. First few composite numbers are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, ………

Input: 90   
Output: 22
Explanation: If we add 21 4's, then we 
get 84 and then add 6 to it, we get 90.

Input: 10
Output: 2
Explanation: 4 + 6 = 10