Browse Source

Cleanup

pull/3/head
Ryan Reed 3 years ago
parent
commit
659e2105a5
1 changed files with 2 additions and 4 deletions
  1. +2
    -4
      puzzles/day03.py

+ 2
- 4
puzzles/day03.py View File

@ -12,18 +12,16 @@ from typing import Dict, List, Tuple
from collections import defaultdict
class Diagnostics:
_most_common = None
report = None
def __init__(self, report: List[int]) -> None:
self.report = report
self._most_common = self.commonality(report)
def power_usage(self) -> None:
half_count = len(self.report)/2
most_common = self.commonality(self.report)
gamma = epsilon = ""
for common in self._most_common:
for common in most_common:
if common == 1:
gamma += "1"
epsilon += "0"


Loading…
Cancel
Save