My basic intuition to solve this problem is by using permutation and combination. Example- n=2,k=2 5c1 * 21c1 + 21c1 * 5c1 + 21c1*21c1 + 5c1 * 5c1 Am I going to right direction or not?
n=1,k=1 21c1 +5c1=26
Please do provide code too.