Clean 2022.
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
import copy
|
||||
import sys
|
||||
from functools import reduce
|
||||
@@ -7,7 +5,6 @@ from typing import Callable, Final, Mapping, Sequence
|
||||
|
||||
|
||||
class Monkey:
|
||||
|
||||
id: Final[int]
|
||||
items: Final[Sequence[int]]
|
||||
worry_fn: Final[Callable[[int], int]]
|
||||
@@ -97,8 +94,7 @@ def run(
|
||||
# number of inspects
|
||||
inspects = {monkey: 0 for monkey in monkeys}
|
||||
|
||||
for round in range(n_rounds):
|
||||
|
||||
for _ in range(n_rounds):
|
||||
for monkey in monkeys:
|
||||
for item in items[monkey]:
|
||||
inspects[monkey] += 1
|
||||
|
Reference in New Issue
Block a user