Skip to main content
added 2 characters in body
Source Link

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

Given a set of integers find the sum of all integers in it*0+Total@Input[] 

It doesn't use any comments or no-ops, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

It doesn't use any comments or no-ops, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[] 

It doesn't use any comments or no-ops, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

added 10 characters in body
Source Link
March Ho
  • 296
  • 3
  • 10

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

It doesn't use any comments or no-ops, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

It doesn't use any comments, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

It doesn't use any comments or no-ops, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.

Source Link
March Ho
  • 296
  • 3
  • 10

Mathematica, distance 17

Given a set of integers find the sum of all integers in it*0+Total@Input[]

It doesn't use any comments, but instead declares all of the words as variables, and then gets rid of them by multiplying by zero.

It also has the benefit of being the only answer that actually takes a set of integers as its input.

The input {1,2,3} provides the output 6 as expected.

Unfortunately, the Mathematica Sum function doesn't do the task in the question, therefore necessitating a larger number of bytes.