AND of Triples Zero

Given an array of integers nums, count the number of triples (i, j, k) where indices can repeat, such that nums[i] & nums[j] & nums[k] == 0.

Examples
Input: [2,1,3]
Output: 12
Hints

AND of Triples Zero

Given an array of integers nums, count the number of triples (i, j, k) where indices can repeat, such that nums[i] & nums[j] & nums[k] == 0.