Files
contests/misc/so_mu_dung/code.py

19 lines
281 B
Python

import math
highest_num = [0]*31
a = [int(_) for _ in input().split()]
for i in a:
for k in range(32, 0, -1):
if (i % 2**k == 0):
highest_num[k] += 1
res = 0
for i in highest_num:
if (i <= 1):
continue
res += math.comb(i, 2)
print(res)