Skip to main content
added 84 characters in body
Source Link
TheLethalCoder
  • 7.2k
  • 27
  • 43

C# (Mono), 3838 37 bytes

n=>System.Linq.Enumerable.Repeat(n,n)

Old version for 38 bytes:

n=>"".PadLeft(n,(char)n).ToCharArray()

Try it online!

A char in C# is an int underneath so this appears to be valid.


C# (Mono), 44 bytes

using System.Linq;n=>new int[n].Select(_=>n)

If the above is invalid this is for an extra 6 bytes.

Try it online!

C# (Mono), 38 bytes

n=>"".PadLeft(n,(char)n).ToCharArray()

Try it online!

A char in C# is an int underneath so this appears to be valid.


C# (Mono), 44 bytes

using System.Linq;n=>new int[n].Select(_=>n)

If the above is invalid this is for an extra 6 bytes.

Try it online!

C# (Mono), 38 37 bytes

n=>System.Linq.Enumerable.Repeat(n,n)

Old version for 38 bytes:

n=>"".PadLeft(n,(char)n).ToCharArray()

Try it online!

A char in C# is an int underneath so this appears to be valid.


C# (Mono), 44 bytes

using System.Linq;n=>new int[n].Select(_=>n)

If the above is invalid this is for an extra 6 bytes.

Try it online!

Source Link
TheLethalCoder
  • 7.2k
  • 27
  • 43

C# (Mono), 38 bytes

n=>"".PadLeft(n,(char)n).ToCharArray()

Try it online!

A char in C# is an int underneath so this appears to be valid.


C# (Mono), 44 bytes

using System.Linq;n=>new int[n].Select(_=>n)

If the above is invalid this is for an extra 6 bytes.

Try it online!