Skip to main content
added thanks to commenters
Source Link
user117104
user117104

Swift, 55 49 20 bytes

-6 bytes thanks to @RydwolfPrograms
-29 bytes thanks to @Jacob
{String($0,radix:2)}

Try it online!

Thanks to @Jacob in the comments for this (much lower byte-count) solution!

Swift, 55 49 20 bytes

{String($0,radix:2)}

Try it online!

Thanks to @Jacob in the comments for this (much lower byte-count) solution!

Swift, 55 49 20 bytes

-6 bytes thanks to @RydwolfPrograms
-29 bytes thanks to @Jacob
{String($0,radix:2)}

Try it online!

added 71 characters in body
Source Link
user117104
user117104

SwiftSwift, 55 4949 20 bytes

  
func x(y:Int)->String{
return String(y$0,radix:2)
 }

Try it online! ThanksTry it online!

Thanks to @RydwoldPrograms for@Jacob in the tip about whitespacecomments for this (much lower byte-count) solution!

Swift, 55 49 bytes

 
func x(y:Int)->String{
return String(y,radix:2)
 }

Try it online! Thanks to @RydwoldPrograms for the tip about whitespace!

Swift, 55 49 20 bytes

 
{String($0,radix:2)}

Try it online!

Thanks to @Jacob in the comments for this (much lower byte-count) solution!

removed 6 bytes
Source Link
user117104
user117104

Swift, 5555 49 bytes

func x(y: Int) -> String >String{
    return String(y, radix: 2)
}

Try it online!Try it online! Thanks to @RydwoldPrograms for the tip about whitespace!

Swift, 55 bytes

func x(y: Int) -> String {
    return String(y, radix: 2)
}

Try it online!

Swift, 55 49 bytes

func x(y:Int)->String{
return String(y,radix:2)
}

Try it online! Thanks to @RydwoldPrograms for the tip about whitespace!

Source Link
user117104
user117104
Loading