Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Twelve-statements/Mathematica/twelve-statements.math
Normal file
10
Task/Twelve-statements/Mathematica/twelve-statements.math
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Print["Answer:\n", Column@Cases[#, {s_, 0} :> s], "\nNear misses:\n",
|
||||
Column@Cases[#, {s_, 1} :> s]] &[{#,
|
||||
Count[Boole /@ {Length@# == 12, Total@#[[7 ;;]] == 3,
|
||||
Total@#[[2 ;; 12 ;; 2]] == 2, #[[5]] (#[[6]] + #[[7]] - 2) ==
|
||||
0, Total@#[[2 ;; 4]] == 0,
|
||||
Total@#[[1 ;; 11 ;; 2]] == 4, #[[2]] + #[[3]] ==
|
||||
1, #[[7]] (#[[5]] + #[[6]] - 2) == 0,
|
||||
Total@#[[;; 6]] == 3, #[[11]] + #[[12]] == 2,
|
||||
Total@#[[7 ;; 9]] == 1, Total@#[[;; 11]] == 4} - #,
|
||||
Except[0]]} & /@ Tuples[{1, 0}, 12]]
|
||||
Loading…
Add table
Add a link
Reference in a new issue