|
|
@ -41,24 +41,18 @@ def countQuestionsAll( group ): |
|
|
|
if( person != "" and person != None ): |
|
|
|
if( person != "" and person != None ): |
|
|
|
personsLen += 1 |
|
|
|
personsLen += 1 |
|
|
|
chars = toList(person) |
|
|
|
chars = toList(person) |
|
|
|
print(person, "#", chars) |
|
|
|
|
|
|
|
for char in chars: |
|
|
|
for char in chars: |
|
|
|
if( char and char != "" ): |
|
|
|
if( char and char != "" ): |
|
|
|
groupQs.append(char) |
|
|
|
groupQs.append(char) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print("GRP", groupQs) |
|
|
|
|
|
|
|
allQs = 0 |
|
|
|
allQs = 0 |
|
|
|
seenQ = [] |
|
|
|
seenQ = [] |
|
|
|
for q in groupQs: |
|
|
|
for q in groupQs: |
|
|
|
num = groupQs.count(q) |
|
|
|
num = groupQs.count(q) |
|
|
|
print( "q:", q, "num", num, personsLen, end="" ) |
|
|
|
|
|
|
|
if(num == personsLen and not q in seenQ): |
|
|
|
if(num == personsLen and not q in seenQ): |
|
|
|
print(" valid") |
|
|
|
|
|
|
|
seenQ.append(q) |
|
|
|
seenQ.append(q) |
|
|
|
allQs += 1 |
|
|
|
allQs += 1 |
|
|
|
else: |
|
|
|
|
|
|
|
print(" not valid") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(allQs) |
|
|
|
print(allQs) |
|
|
|
|
|
|
|
|
|
|
@ -77,4 +71,6 @@ for group in groups: |
|
|
|
grpAll += num2 |
|
|
|
grpAll += num2 |
|
|
|
grpAllList.append(num2) |
|
|
|
grpAllList.append(num2) |
|
|
|
|
|
|
|
|
|
|
|
print("\n", grpCount, grpAll) |
|
|
|
print("----") |
|
|
|
|
|
|
|
print("Part1:", grpCount) |
|
|
|
|
|
|
|
print("Part2:", grpAll) |
|
|
|