Skip to main content
1 of 5
Gabber
  • 161
  • 4

Scala, 54 bytes

def f(l: Int*)=l.maxBy(_.toBinaryString.count(_=='1'))

Try it online!

Converts each number in the list l to a binary string, max by the number of ones in the string.

Gabber
  • 161
  • 4