Precreation contest files
This commit is contained in:
18
misc/so_mu_dung/code.py
Normal file
18
misc/so_mu_dung/code.py
Normal file
@@ -0,0 +1,18 @@
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user