Skip to main content
deleted 10 characters in body
Source Link

HASKELL 10798 (207198-100 bonus)

edit: I'd comment, but I can't, I'd suggest to treat unlimited range as a bonus

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegralfromInteger k)$iterate(concatMap$o>>=o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 107 (207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 98 (198-100 bonus)

edit: I'd comment, but I can't, I'd suggest to treat unlimited range as a bonus

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take(fromInteger k)$iterate(>>=o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 
added 2 characters in body
Source Link

HASKELL 107 (207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 107 (207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 107 (207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 
Improved solution
Source Link

HASKELL 111107 (211207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 111 (211-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 

HASKELL 107 (207-100 bonus)

It seems to me that a few answer miss a point: using at most k n. This means that f(4,3) can generate (4/4) = 1 or (4*4)=16.

Anyway that's my answer. I assume int/int to behave as floor. Exponentiation is included.

import Data.List f=[(+),(-),div,(*),(^)] a y f=f y o n x=filter(>0).map(a n.a x)$f++map flip f t[n,k]=(0:).nub.concat.take (fromIntegral k)$iterate(concatMap$o n)[n] main=interact$show.sort.t.map read.words 

HASKELL 111 (211-100 bonus)

import Data.List f=[(+),(-),div,(*),(^)] c=concatMap a y f=f y o n x=map(a n.a x)$f++map flip f l 1 _ s=0:s l k o s=c(l(k-1)o.filter(>0))[c o s,s] t[n,k]=l k(o n)[n] main=interact$show.sort.nub.t.map read.words 
Source Link
Loading