*Problem A:*

Given an algorithm $mathcal{A}$ for $(I,k)$, $A$ return true $iff$ There exist a subgroup $Ssubseteq I$ s.t for values that is **less than** $k$ some property hold.

*Problem B:*

Given an algorithm $mathcal{A}$ for $(I,k)$, $A$ return true $iff$ There exist a subgroup $Ssubseteq I$ s.t for values that is **exactly** $k$ some property hold.

Is there a generic way of constructing a solution for *Problem B* using the algorithm for *Problem A*?

For example:

Given an algorithm for Subset Sum **decision problem** with slight variation, assume that the algorithm returns Yes if it has a subset in size less than $k$ that sum to some $t$ and K-Sum problem a generalization for the 3-Sum description

Is there a way to construct a solution for the K-Sum?

I am not asking specifically for those algorithms but in general.

Can it always be done? Are there special cases?