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