|
|
@ -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" |
|
|
|