Skip to main content
Commonmark migration
Source Link

#Mathematica 10 44

Mathematica 10 44

Edit

My first response was based on a misunderstanding about the nature of the challenge, as noted by Ilmari. Here's another try.

Usage

f[n___, 1, n___] := n - 1;
j_~f~k_ := BitXor[j - 1, k - 1]

#Mathematica 10 44

Edit

My first response was based on a misunderstanding about the nature of the challenge, as noted by Ilmari. Here's another try.

Usage

f[n___, 1, n___] := n - 1;
j_~f~k_ := BitXor[j - 1, k - 1]

Mathematica 10 44

Edit

My first response was based on a misunderstanding about the nature of the challenge, as noted by Ilmari. Here's another try.

Usage

f[n___, 1, n___] := n - 1;
j_~f~k_ := BitXor[j - 1, k - 1]
Post Undeleted by DavidC
added 92 characters in body
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105

#Mathematica 1010 44

m[[#, #2]] &

Edit

My first response was based on a misunderstanding about the nature of the challenge, as noted by Ilmari. Here's another try.

Usage

m = {{13, 10, 4, 0}f[n___, {31, 12,n___] 7,:= 8},n {15,- 1,1;
j_~f~k_ 14,:= 6},BitXor[j {9,- 21, 11,k 5}}
m[[#,- #2]]&[2,3]1]

7

#Mathematica 10

m[[#, #2]] &

Usage

m = {{13, 10, 4, 0}, {3, 12, 7, 8}, {15, 1, 14, 6}, {9, 2, 11, 5}}
m[[#, #2]]&[2,3]

7

#Mathematica 10 44

Edit

My first response was based on a misunderstanding about the nature of the challenge, as noted by Ilmari. Here's another try.

Usage

f[n___, 1, n___] := n - 1;
j_~f~k_ := BitXor[j - 1, k - 1]
Post Deleted by DavidC
deleted 137 characters in body
Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105

#Mathematica 10

m[[#, #2]] &

Usage

m = {{13, 10, 4, 0}, {3, 12, 7, 8}, {15, 1, 14, 6}, {9, 2, 11, 5}}
m[[#, #2]]&[2,3]

7

Explanation

m[[#, #2]]&[2,3] is a shortened form of Part[m,{2,3}], which gives the contents of the second row, third column.

#Mathematica 10

m[[#, #2]] &

Usage

m = {{13, 10, 4, 0}, {3, 12, 7, 8}, {15, 1, 14, 6}, {9, 2, 11, 5}}
m[[#, #2]]&[2,3]

7

Explanation

m[[#, #2]]&[2,3] is a shortened form of Part[m,{2,3}], which gives the contents of the second row, third column.

#Mathematica 10

m[[#, #2]] &

Usage

m = {{13, 10, 4, 0}, {3, 12, 7, 8}, {15, 1, 14, 6}, {9, 2, 11, 5}}
m[[#, #2]]&[2,3]

7

Source Link
DavidC
  • 25.4k
  • 2
  • 52
  • 105
Loading