Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

###GolfScript, (削除) 105 (削除ここまで) 101 characters###

GolfScript, (削除) 105 (削除ここまで) 101 characters

{](=}+1360222640 6base%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{{/}+%p}*;;}{;~|!5+p}if

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[10 14]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6

###GolfScript, (削除) 105 (削除ここまで) 101 characters###

{](=}+1360222640 6base%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{{/}+%p}*;;}{;~|!5+p}if

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[10 14]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6

GolfScript, (削除) 105 (削除ここまで) 101 characters

{](=}+1360222640 6base%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{{/}+%p}*;;}{;~|!5+p}if

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[10 14]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6
added 19 characters in body
Source Link
Howard
  • 23.6k
  • 2
  • 45
  • 83

###GolfScript, 105(削除) 105 (削除ここまで) 101 characters###

~]1831830560 6base{1$=](=}%4+1360222640 6base%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{\{1$/}%p+%p}*;;}{;~|!5+p}if;if

A first (and rather clumsy) approach using GolfScript.

The test cases (see online see online):

> 1 4 1 2 24 68
1
[14[10 10]14]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6

###GolfScript, 105 characters###

~]1831830560 6base{1$=}%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{\{1$/}%p}*;;}{;~|!5+p}if;

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[14 10]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6

###GolfScript, (削除) 105 (削除ここまで) 101 characters###

{](=}+1360222640 6base%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{{/}+%p}*;;}{;~|!5+p}if

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[10 14]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6
Source Link
Howard
  • 23.6k
  • 2
  • 45
  • 83

###GolfScript, 105 characters###

~]1831830560 6base{1$=}%4/{~*@@*-}%.2=0<{{~)}%}*).{1${1$%0>}%~|2${0<}%~|.++.)p!{\{1$/}%p}*;;}{;~|!5+p}if;

A first (and rather clumsy) approach using GolfScript.

The test cases (see online):

> 1 4 1 2 24 68
1
[14 10]
> 1 4 1 2 24 67
2
> 1 4 1 2 24 36
3
> 1 4 1 2 24 97
4
> 2 4 1 2 24 68
5
> 2 4 1 2 24 48
6

AltStyle によって変換されたページ (->オリジナル) /