diff options
| -rw-r--r-- | challenge-119/frankivo/scala/Sequencer.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/challenge-119/frankivo/scala/Sequencer.scala b/challenge-119/frankivo/scala/Sequencer.scala index 7185318871..7fac61b488 100644 --- a/challenge-119/frankivo/scala/Sequencer.scala +++ b/challenge-119/frankivo/scala/Sequencer.scala @@ -1,8 +1,8 @@ object Sequencer { def sequencer(n: Int): Int = { - (0 to (n / 3)) - .map(x => (1 to 3).map(y => y + x * 10)) - .flatten - .toSeq(n) + ((1 to n * n.toString.length * 30) + .filterNot(_.toString exists (((4 to 9).toSeq :+ 0).map(_.toString) contains _.toString)) + .filterNot(_.toString contains "11") + ) (n - 1) } }
\ No newline at end of file |
