Header
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# AOC Day Script Day 08
|
||||
# Date : 2024.12.08
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
@@ -41,7 +41,7 @@ def calcAntiNodes(posAntA, posAntB,maxPos):
|
||||
return (X3,Y3)
|
||||
return (-1,-1)
|
||||
|
||||
def findAntiNodesA(maxPos,posAntennes):
|
||||
def findAntiNodes(maxPos,posAntennes):
|
||||
posAntiNodes=set()
|
||||
for keys, antenne in posAntennes.items():
|
||||
for (X1,Y1) in antenne:
|
||||
@@ -71,7 +71,7 @@ def bruteForceAntiNodes(maxPos,posAntennes):
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
maxPos,posAntennes = identifyAntennes(data)
|
||||
antiNodes = findAntiNodesA(maxPos,posAntennes)
|
||||
antiNodes = findAntiNodes(maxPos,posAntennes)
|
||||
gameScoreA = len(antiNodes)
|
||||
return gameScoreA
|
||||
|
||||
|
||||
Reference in New Issue
Block a user