fork download
using System;
using System.Linq;
using System.Collections.Generic;

public class Test
{
	public static String duplicateChars(IEnumerable<Char> input, int factor)
	{
	    var chars = from c in input
	                from cc in Enumerable.Repeat(c, factor)
	                select cc;
	    return new String(chars.ToArray());
	}


	public static void Main()
	{
            Console.Write(duplicateChars("123", 2));		
	}
}
Success #stdin #stdout 0.04s 36936KB
stdin
Standard input is empty
stdout
112233