The formula
If the minimum correct exceeds your planned attempts, the target cannot be reached: increase attempted questions or change your target.
Because wrong = A − C for A planned attempts, the score is P × C − N × (A − C), which rearranges to (P + N)C − NA.
Setting that equal to the target T and solving for C gives minimumCorrect = ceil((T + (N × A)) ÷ (P + N)).
