Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
2
Task/Sum-to-100/Mathematica/sum-to-100-1.math
Normal file
2
Task/Sum-to-100/Mathematica/sum-to-100-1.math
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
operations = DeleteCases[Tuples[{"+", "-", ""}, 9], {x_, y__} /; x == "+"];
|
||||
sums = Map[StringJoin[Riffle[#, CharacterRange["1", "9"]]] &, operations];
|
||||
1
Task/Sum-to-100/Mathematica/sum-to-100-2.math
Normal file
1
Task/Sum-to-100/Mathematica/sum-to-100-2.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
TableForm@Select[sums, ToExpression@# == 100 &]
|
||||
1
Task/Sum-to-100/Mathematica/sum-to-100-3.math
Normal file
1
Task/Sum-to-100/Mathematica/sum-to-100-3.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
MaximalBy[Counts@ToExpression@sums, Identity]
|
||||
2
Task/Sum-to-100/Mathematica/sum-to-100-4.math
Normal file
2
Task/Sum-to-100/Mathematica/sum-to-100-4.math
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
pos = Cases[ToExpression@sums, _?Positive];
|
||||
n = 1; While[MemberQ[pos, n], ++n];
|
||||
1
Task/Sum-to-100/Mathematica/sum-to-100-5.math
Normal file
1
Task/Sum-to-100/Mathematica/sum-to-100-5.math
Normal file
|
|
@ -0,0 +1 @@
|
|||
{#, ToExpression@#}&/@TakeLargestBy[sums, ToExpression, 10]//TableForm
|
||||
Loading…
Add table
Add a link
Reference in a new issue