You can do this in Haskell easily without a timeout, how you filter them is the critical part.
For example how would you do this in Haskell :
-generate all the numbers from 1 to 50 bazillion -filter the numbers which are equal to 69 -return the remaining list
That's the wrong question. The correct question is, it's not specified at all how 1 is handled.
1
I've changed the input range to n > 1. Given that 1 should be omitted it doesn't make sense for 1 to be the input anyway.
n > 1
I don't know how to work it out
Yeah. Doing that hurt a little.
Great job!
@fabs, Thanks. Is the problem fixed?
Very nice! I changed the initial function type declaration (from String -> String to String -> Int -> String) so now it works. It could still use some test cases.
String -> String
String -> Int -> String
Loading collection data...
You can do this in Haskell easily without a timeout, how you filter them is the critical part.
For example how would you do this in Haskell :
-generate all the numbers from 1 to 50 bazillion
-filter the numbers which are equal to 69
-return the remaining list
That's the wrong question. The correct question is, it's not specified at all how
1
is handled.I've changed the input range to
n > 1
. Given that1
should be omitted it doesn't make sense for1
to be the input anyway.I don't know how to work it out
Yeah. Doing that hurt a little.
Great job!
@fabs,
Thanks. Is the problem fixed?
Very nice! I changed the initial function type declaration (from
String -> String
toString -> Int -> String
) so now it works. It could still use some test cases.