simplified foreach loop
This commit is contained in:
parent
bd84c48a21
commit
8cbe1a8f52
@ -40,9 +40,7 @@ object Puzzle2 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
minCounts.foreach((p: (String, Int)) => {
|
minCounts.values.foreach((count: Int) => power *= count)
|
||||||
power *= p._2
|
|
||||||
})
|
|
||||||
return power
|
return power
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user