Problem Statement
A description of the problem can be found on Hackerrank.
Solution
1 2 3 4 5 6 7 |
object ArrayOfN extends App { def f(num: Int): List[Int] = (1 to num).toList println(f(readInt).length) } |
Solution also available on my GitHub.