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.
for example -> (1,3,4,7) correct subsets accroding to me are ->
(1,1,1,2),(1,1,1,3),(1,1,1,4),(1,1,1,5),(1,1,1,6),(1,1,1,7),(1,2,2,2),(1,3,3,3),(1,1,2,3),(1,1,2,4),(1,1,2,5),(1,1,2,6),(1,1,2,7),(1,1,3,4),(1,1,3,5),(1,1,3,6),(1,1,3,7),(1,1,4,5),(1,1,4,6),(1,1,4,7),(1,2,2,3),(1,2,2,4),(1,2,2,5),(1,2,2,6),(1,2,2,7),(1,3,3,4),(1,3,3,5),(1,3,3,6),(1,3,3,6),(1, 3,3,7),(1,2,4,4),(1,3,4,4),(1,2,3,4),(1,2,3,5),(1,2,3,6),(1,2,3,7),(1,3,4,5),(1,3,4,6),(1,3,4,7),(1,2,4,5),(1,2,4,6),(1,2,4,7) =41, but ans is 40 :/ can anyone tell what wrong i'm calculating ??
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Beautiful Quadruples
You are viewing a single comment's thread. Return to all comments →
for example -> (1,3,4,7) correct subsets accroding to me are -> (1,1,1,2),(1,1,1,3),(1,1,1,4),(1,1,1,5),(1,1,1,6),(1,1,1,7),(1,2,2,2),(1,3,3,3),(1,1,2,3),(1,1,2,4),(1,1,2,5),(1,1,2,6),(1,1,2,7),(1,1,3,4),(1,1,3,5),(1,1,3,6),(1,1,3,7),(1,1,4,5),(1,1,4,6),(1,1,4,7),(1,2,2,3),(1,2,2,4),(1,2,2,5),(1,2,2,6),(1,2,2,7),(1,3,3,4),(1,3,3,5),(1,3,3,6),(1,3,3,6),(1, 3,3,7),(1,2,4,4),(1,3,4,4),(1,2,3,4),(1,2,3,5),(1,2,3,6),(1,2,3,7),(1,3,4,5),(1,3,4,6),(1,3,4,7),(1,2,4,5),(1,2,4,6),(1,2,4,7) =41, but ans is 40 :/ can anyone tell what wrong i'm calculating ??