Skip to main content
deleted 7 characters in body; added 29 characters in body
Source Link
ThreeFx
  • 1.5k
  • 9
  • 22

Haskell, 130130 123 bytes

This is not a challenge for Haskell. Also I am in golfing this.

Thanks to @nimi.

import Data.List
f=g.sort
g(x:a@(y:z:b))|x==y&&y==z=100*h|x>z=j x+g b|0<1=ja|0<1=100*h x+g ab
g(x:y)=j x+g ya
g _=0
h 1=10
h x=x
j 1=100
j 5=50
j _=0

Haskell, 130 bytes

This is not a challenge for Haskell. Also I am in golfing this.

import Data.List
f=g.sort
g(x:a@(y:z:b))|x==y&&y==z=100*h x+g b|0<1=j x+g a
g(x:y)=j x+g y
g _=0
h 1=10
h x=x
j 1=100
j 5=50
j _=0

Haskell, 130 123 bytes

This is not a challenge for Haskell. Also I am in golfing this.

Thanks to @nimi.

import Data.List
f=g.sort
g(x:a@(y:z:b))|x>z=j x+g a|0<1=100*h x+g b
g(x:y)=j x+g a
g _=0
h 1=10
h x=x
j 1=100
j 5=50
j _=0
Source Link
ThreeFx
  • 1.5k
  • 9
  • 22

Haskell, 130 bytes

This is not a challenge for Haskell. Also I am in golfing this.

import Data.List
f=g.sort
g(x:a@(y:z:b))|x==y&&y==z=100*h x+g b|0<1=j x+g a
g(x:y)=j x+g y
g _=0
h 1=10
h x=x
j 1=100
j 5=50
j _=0