Permalink
Browse files

Allow stats for files with only 1 puzzle in to be printed

  • Loading branch information...
1 parent 09c41ef commit 09f3470b48d0fd0ac37995aeb3f6e1e49eee161c @apauley committed Mar 24, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 sudoku.py
View
2 sudoku.py
@@ -150,7 +150,7 @@ def time_solve(grid):
return (t, solved(puzzle), puzzle)
times, results, valuedicts = zip(*[time_solve(grid) for grid in grids])
N = len(grids)
- if N > 1:
+ if N >= 1:
print """Solved %d of %d puzzles from %s in %.6f secs
\t(avg %.6f secs (%d Hz), max %.6f secs, min %.6f secs).""" % (
sum(results), N, name, sum(times), sum(times)/N, N/sum(times), max(times), min(times))

0 comments on commit 09f3470

Please sign in to comment.