initial commit
This commit is contained in:
+87
@@ -0,0 +1,87 @@
|
||||
module program
|
||||
|
||||
open System
|
||||
open System.Windows.Forms
|
||||
|
||||
[<EntryPoint>]
|
||||
let main args =
|
||||
let sprintfA f = sprintf "%A" f
|
||||
let funize f = fun () -> f
|
||||
|
||||
let myFunc () =
|
||||
printfn "Evaluating myFunc"
|
||||
"myFunc Result"
|
||||
let sprintfFunc f = fun () -> sprintf "%A" f
|
||||
let r = sprintfFunc myFunc
|
||||
printfn "%s" (r())
|
||||
|
||||
let problems = [
|
||||
11, fun () -> sprintfA _11.maxProduct;
|
||||
12, fun () -> sprintfA _12.fiveDivisorTriangle;
|
||||
13, fun () -> sprintfA _13.getSum;
|
||||
14, fun () -> sprintfA _14.getLongestChain;
|
||||
17, fun () -> sprintfA _17.getNumberWords;
|
||||
18, fun () -> sprintfA _18.getTriangleMaxTotal;
|
||||
19, fun () -> sprintfA _19.firstSaturdays;
|
||||
20, fun () -> sprintfA _20.getSum;
|
||||
21, fun () -> sprintfA _21.amicalbleSum;
|
||||
22, fun () -> sprintfA _22.nameScores;
|
||||
23, fun () -> sprintfA _23.sumNotAbundant;
|
||||
24, fun () -> sprintfA _24.run;
|
||||
25, fun () -> sprintfA _25.find1000;
|
||||
26, fun () -> sprintfA _26.longestRecurringCycle;
|
||||
27, fun () -> sprintfA _27.quadraticConsecutivePrimes;
|
||||
28, fun () -> sprintfA _28.sumNum;
|
||||
29, fun () -> sprintfA _29.getDistinctTerms;
|
||||
30, fun () -> sprintfA _30.sumOfSumOfFifthNumbers;
|
||||
31, fun () -> sprintfA _31.getCurrencyCombos;
|
||||
32, fun () -> sprintfA _32.panDigitalProduct;
|
||||
33, fun () -> sprintfA _33.cancelling;
|
||||
34, fun () -> sprintfA _34.numSumDigitFactorials;
|
||||
35, fun () -> sprintfA _35.circularPrime;
|
||||
36, fun () -> sprintfA _36.palindromicBase10and2Sum;
|
||||
37, fun () -> sprintfA _37.truncatablePrimes;
|
||||
39, fun () -> sprintfA _39.rightTriPerimeter;
|
||||
40, fun () -> sprintfA _40.positiveIntegerConcat;
|
||||
41, fun () -> sprintfA _41.panDigital;
|
||||
42, fun () -> sprintfA _42.triangleWords;
|
||||
43, fun () -> sprintfA _43.pandigitalDivisible;
|
||||
45, fun () -> sprintfA _45.triPentHex;
|
||||
46, fun () -> sprintfA _46.smallestOddCompositeNotSumOfPrimeTwiceSquare;
|
||||
47, fun () -> sprintfA _47.consequtivePrimes;
|
||||
48, fun () -> sprintfA _48.seriesEnd;
|
||||
49, fun () -> sprintfA _49.primeSequence;
|
||||
50, fun () -> sprintfA _50.sumOfConsequitivePrimes;
|
||||
52, fun () -> sprintfA _52.findSameDigits;
|
||||
53, fun () -> sprintfA _53.combinationGt1M;
|
||||
54, fun () -> sprintfA _54.pokerWinner;
|
||||
55, fun () -> sprintfA _55.lynchrels;
|
||||
56, fun () -> sprintfA _56.exponentialDigitSum;
|
||||
57, fun () -> sprintfA _57.sqrtTwoDigits;
|
||||
58, fun () -> sprintfA _58.primeDiagonals;
|
||||
59, fun () -> sprintfA _59.cypher;
|
||||
63, fun () -> sprintfA _63.powerDigits;
|
||||
69, fun () -> sprintfA _69.relativePrimeFunc;
|
||||
79, fun () -> sprintfA _79.findPasscode;
|
||||
81, fun () -> sprintfA _81.shortestDistance;
|
||||
92, fun () -> sprintfA _92.squareChainLoop;
|
||||
97, fun () -> sprintfA _97.bigPrime;
|
||||
98, fun () -> sprintfA _98.anagramSquares;
|
||||
99, fun () -> sprintfA _99.biggestNum;
|
||||
101, fun () -> sprintfA _101.sumOfFITsOfBOPs;
|
||||
112, fun () -> sprintfA _112.bouncy90;
|
||||
]
|
||||
|
||||
let problemDict = dict problems
|
||||
|
||||
let sw = new System.Diagnostics.Stopwatch()
|
||||
printfn "starting"
|
||||
sw.Start()
|
||||
let result = problemDict.[43]()
|
||||
sw.Stop()
|
||||
printfn "%s" result
|
||||
printfn "done in %A" sw.Elapsed
|
||||
//Clipboard.SetText(result)
|
||||
|
||||
Console.ReadKey() |> ignore
|
||||
0
|
||||
Reference in New Issue
Block a user