CodeJam Problems C# resolution