Skip to main content
Commonmark migration
Source Link

#[Swift 3], 55 49 bytes

[Swift 3], 55 49 bytes

func a(n:Int)->[Int] {return (0..<n).map{_ in n}}

#[Swift 3], 55 49 bytes

func a(n:Int)->[Int] {return (0..<n).map{_ in n}}

[Swift 3], 55 49 bytes

func a(n:Int)->[Int] {return (0..<n).map{_ in n}}
Optimised thanks to Mr. xcoder
Source Link

#[Swift 3], 5555 49 bytes

func a(n:Int)->[Int] {return Array(0..<n).map{$0+n-$0_ in n}}

#[Swift 3], 55 bytes

func a(n:Int)->[Int] {return Array(0..<n).map{$0+n-$0}}

#[Swift 3], 55 49 bytes

func a(n:Int)->[Int] {return (0..<n).map{_ in n}}
Source Link

#[Swift 3], 55 bytes

func a(n:Int)->[Int] {return Array(0..<n).map{$0+n-$0}}