Skip to content

Instantly share code, notes, and snippets.

View Thecentury's full-sized avatar

Mikhail Brinchuk Thecentury

  • Eindhoven, the Netherlands
View GitHub Profile
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
namespace _6652
{
class Program
{
let coins = [50;22;19;17;10;7;5;3;2;1;1;1;1;1] |> List.sortBy (fun x -> -x)
let rec take coins coin =
match coins with
| x::xs when x > coin -> take xs coin
| x::xs when x < coin -> []
| x::xs when x = coin -> xs
| [] -> []
let rec change (coins:list<int>) (amt:int) =
using System;
using System.Threading.Tasks;
namespace SelectMany
{
public static class SelectManyExtensions
{
public static Func<TResult> SelectMany<T1, T2, TResult>( this Func<T1> f1, Func<T1, Func<T2>> selector,
Func<T1, T2, TResult> resultSelector )
{