Badge Mask
Easybit manipulation
Each badge has an id from 0 to 29. A profile stores the earned badges as a single integer: bit i is set when badge i has been earned.
Given the list of badge ids a player earned (ids may repeat), return the stored integer. An empty list gives 0.
Examples
Input: earned = [0,3,3,5]
Output: 41
Input: earned = []
Output: 0