better readking
This commit is contained in:
16
4.py
16
4.py
@@ -40,20 +40,22 @@ def part_two(boards: np.ndarray, number):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
import sys
|
||||||
|
|
||||||
numbers = [int(x) for x in input().split(",")]
|
numbers = [int(x) for x in input().split(",")]
|
||||||
|
|
||||||
input() # Skip blank line
|
input() # Skip blank line
|
||||||
|
|
||||||
boards = []
|
boards = []
|
||||||
|
|
||||||
try:
|
current_board = []
|
||||||
while True:
|
|
||||||
current_board = []
|
for line in sys.stdin:
|
||||||
while (line := input().strip()) != "":
|
if line != "\n":
|
||||||
current_board.append([int(x) for x in line.split()])
|
current_board.append([int(x) for x in line.split()])
|
||||||
|
else:
|
||||||
boards.append(current_board)
|
boards.append(current_board)
|
||||||
except EOFError:
|
current_board = []
|
||||||
boards.append(current_board)
|
|
||||||
|
|
||||||
boards = np.array(boards)
|
boards = np.array(boards)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user