You are viewing a single comment's thread. Return to all comments →
I have function to "merge" skills and return count of 1's.
def mergeSkills(a, b)
(a | b).to_s(2).count("1")
end
I'm converting to binary on read.
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
I have function to "merge" skills and return count of 1's.
def mergeSkills(a, b)
(a | b).to_s(2).count("1")
end
I'm converting to binary on read.