Skip to main content

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When there is a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84, as output, variable, return or on top of the stack, whatever you like.

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84, as output, variable, return or on top of the stack, whatever you like.

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When there is a schijf in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84, as output, variable, return or on top of the stack, whatever you like.

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

added 72 characters in body
Source Link
Charlie
  • 681
  • 4
  • 11

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84, as output, variable, return or on top of the stack, whatever you like.

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84, as output, variable, return or on top of the stack, whatever you like.

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Tweeted twitter.com/#!/StackCodeGolf/status/549012516274446336
added 46 characters in body
Source Link
Charlie
  • 681
  • 4
  • 11

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie 4"4 5 4 55", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie 4 5 4 5.

The output:
The amount of points, ie 84

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

Okay, so yesterday was 2nd Christmas day and my (grand)parents and me had a game of "sjoelen", as it is called in the Netherlands. The inner programmer came up in me, but just when I had the answer, I lost it. I want you to remake it.

The rules:

You have a wooden plank, a sjoelbak, with 4 boxes, each with their own number. When a schijf (A puck-like object) goes in one of the boxes you get the points above that box.

A sjoelbak with schijven
When a schijf is in all 4 of the boxes, you don't get 10 but you get 20 points.

Example:

From left to right: 3 5 4 3
Each box has at least 3 schijven (Plural of schijf) so that is 20 * 3 = 60 points.

Resulting values: 0 2 1 0
02 + 23 + 14 + 01 = 10 points.

Which makes a total of 60+10 = 70 points.

The input:
The amount of schijven from left to right, ie "4 5 4 5", [4,5,4,5], "4\n5\n4\n5", whatever you like.

The output:
The amount of points, ie 84

As in each and every code golf, you can not use external scripts and the code with the least bytes wins.

PS: As you may have already noticed, I'm Dutch. Feel free to edit possible grammar mistakes.

edited tags
Link
ProgramFOX
  • 8.3k
  • 7
  • 45
  • 70
Loading
Source Link
Charlie
  • 681
  • 4
  • 11
Loading