You are viewing a single comment's thread. Return to all comments →
Can you explain this part: for i in range(1, (k//2)+1): if i != k-i: c += max(counter[i], counter[k-i]) else: c += min(counter[i], 1)
Seems like cookies are disabled on this browser, please enable them to open this website
Non-Divisible Subset
You are viewing a single comment's thread. Return to all comments →
Can you explain this part: for i in range(1, (k//2)+1): if i != k-i: c += max(counter[i], counter[k-i]) else: c += min(counter[i], 1)