fork download
  1. object Main extends App {
  2. // your code goes here
  3. def f(arr:List[Int]):Int = arr.indices.collect{ case i if arr(i)%2 == 1 => arr(i)}.toList.sum
  4. }
Success #stdin #stdout 0.41s 45060KB
stdin
Standard input is empty
stdout
Standard output is empty