(grid)
| 174 | """ |
| 175 | |
| 176 | def time_solve(grid): |
| 177 | start = time.monotonic() |
| 178 | values = solve(grid) |
| 179 | t = time.monotonic() - start |
| 180 | ## Display puzzles that take long enough |
| 181 | if showif is not None and t > showif: |
| 182 | display(grid_values(grid)) |
| 183 | if values: |
| 184 | display(values) |
| 185 | print(f"({t:.5f} seconds)\n") |
| 186 | return (t, solved(values)) |
| 187 | |
| 188 | times, results = zip(*[time_solve(grid) for grid in grids]) |
| 189 | if (n := len(grids)) > 1: |
no test coverage detected