!! used as default html header if there is none in the selected theme. Prog sum of integers

Prog sum of integers --- Introduction ---

This modules gathers interactive programming exercises, variable and configurable, on the subject of computing a list of integers. The software can ask you to produce an algorithm to make a partial or total sum of the list, according to various formulas. It will then compile your submitted code and test it on randomly generated lists for the validity of the code. New comers may start by testing the most standard case.

Sum of absolute values

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of affine formula

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Alternate sum

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Count of digits

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Count of a digit

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Conditional coeff by divisibility

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Conditional coeff by inequality

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Conditional coeff by parity

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


. Simple count

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of first digit

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of last digit

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of a digit

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of digits

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of distances with a constant

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Indexed sum of distances

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of gcd I

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of gcd II

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of gcd III

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Indexed sum I

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Indexed sum II

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum min-max with a constant

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Index sum min-max I

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Indexed sum min-max II

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


. Simple sum

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:


Sum of signs

a function which takes a list of integers

0,...,,...,-1

(), and returns , . and returns .


ERROR. Your code didn't give anything. Syntax error?
Your code didn't pass the test on the following list of integers:

It returns , while the right result should be .

Please correct (try number , limited to ).


ATTENTION! The length of your code is limited to characters not including spaces. And the score depends on the length. The shorter is the code, the higher is the score, up to a complete score if the length does not exceed .

The following names ARE NOT allowed in the code:

The most recent version


This page is not in its usual appearance because WIMS is unable to recognize your web browser.
In order to access WIMS services, you need a browser supporting forms. In order to test the browser you are using, please type the word wims here: and press ``Enter''.

Please take note that WIMS pages are interactively generated; they are not ordinary HTML files. They must be used interactively ONLINE. It is useless for you to gather them through a robot program.