init
This commit is contained in:
Binary file not shown.
@@ -8,22 +8,26 @@ from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
gameScoreA=0
|
||||
gameScoreB=0
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay)
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
global gameScoreA
|
||||
score = gameScoreA
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
global gameScoreB
|
||||
score = gameScoreB
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
|
||||
47
2024/day01.py
Normal file
47
2024/day01.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day02.py
Normal file
47
2024/day02.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day03.py
Normal file
47
2024/day03.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day04.py
Normal file
47
2024/day04.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day05.py
Normal file
47
2024/day05.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day06.py
Normal file
47
2024/day06.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day07.py
Normal file
47
2024/day07.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day08.py
Normal file
47
2024/day08.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day09.py
Normal file
47
2024/day09.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day10.py
Normal file
47
2024/day10.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day11.py
Normal file
47
2024/day11.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day12.py
Normal file
47
2024/day12.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day13.py
Normal file
47
2024/day13.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day14.py
Normal file
47
2024/day14.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day15.py
Normal file
47
2024/day15.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day16.py
Normal file
47
2024/day16.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day17.py
Normal file
47
2024/day17.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day18.py
Normal file
47
2024/day18.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day19.py
Normal file
47
2024/day19.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day20.py
Normal file
47
2024/day20.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day21.py
Normal file
47
2024/day21.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day22.py
Normal file
47
2024/day22.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day23.py
Normal file
47
2024/day23.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day24.py
Normal file
47
2024/day24.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
47
2024/day25.py
Normal file
47
2024/day25.py
Normal file
@@ -0,0 +1,47 @@
|
||||
# AOC Day Script Day XX
|
||||
# Date : 20XX.12.XX
|
||||
# Python Code
|
||||
# Developer : David Bandeira
|
||||
|
||||
import sys,time
|
||||
from helpingFunctions import *
|
||||
|
||||
setSampleMode(False)
|
||||
|
||||
aocDay = identifyDay(sys.argv[0])
|
||||
aocYear = identifyYear(sys.argv[0])
|
||||
|
||||
path = getPath2Data(aocDay,aocYear)
|
||||
filename = getFilename2Data(aocDay)
|
||||
|
||||
def taskA (data) -> int:
|
||||
gameScoreA = 0
|
||||
return gameScoreA
|
||||
|
||||
def taskB (data) -> int:
|
||||
gameScoreB = 0
|
||||
return gameScoreB
|
||||
|
||||
def task(task: int,data) -> int:
|
||||
score=0
|
||||
if task == 1:
|
||||
score = taskA(data)
|
||||
elif task == 2:
|
||||
score = taskB(data)
|
||||
return score
|
||||
|
||||
def main():
|
||||
showSampleMode()
|
||||
try:
|
||||
data = open(path+'/'+filename).read().strip().split('\n')
|
||||
except:
|
||||
print ('no inputfile found')
|
||||
print ('please check file %s on path %s' % (filename, path))
|
||||
quit()
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 1: '+ str(task(1,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
st=time.time()
|
||||
print ('Day '+aocDay+': Tasks 2: '+ str(task(2,data))+ ' executation time: ' + str(int((time.time()-st)*1000)) + 'ms')
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -4,10 +4,17 @@ sampleMode = False
|
||||
|
||||
def identifyDay(inputArgument):
|
||||
twoDigitsDay = '00'
|
||||
day = 0 if (inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')] == 'X') else inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')]
|
||||
day = 0 if (inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')] == 'XX') else inputArgument[inputArgument.rfind('/')+4:inputArgument.rfind('.')]
|
||||
twoDigitsDay = str(day).zfill(2)
|
||||
return twoDigitsDay
|
||||
|
||||
def identifyYear(inputArgument):
|
||||
inputArgument = inputArgument[:inputArgument.rfind('/')]
|
||||
inputArgument = inputArgument[inputArgument.rfind('/')+1:]
|
||||
year = int(inputArgument) if (inputArgument.isnumeric()) else 0
|
||||
fourDigitsYear = str(year).zfill(4)
|
||||
return fourDigitsYear
|
||||
|
||||
def setSampleMode(mode:bool):
|
||||
global sampleMode
|
||||
if (mode) : sampleMode = True
|
||||
@@ -23,11 +30,11 @@ def showSampleMode():
|
||||
print ("----------------------")
|
||||
return
|
||||
|
||||
def getPath2Data(aocDay):
|
||||
return './day'+str(aocDay)+'/'
|
||||
def getPath2Data(aocDay,aocYear):
|
||||
return './'+str(aocYear)+'/day'+str(aocDay)+'/'
|
||||
|
||||
def getFilename2Data(aocDay):
|
||||
dataFilename = 'sample.day'+str(aocDay) if ( sampleMode ) else 'data.day'+str(aocDay)
|
||||
dataFilename = 'sample.day'+str(aocDay) if ( sampleMode ) else 'input.day'+str(aocDay)
|
||||
return dataFilename
|
||||
|
||||
def readDataFile (path, filename):
|
||||
|
||||
Reference in New Issue
Block a user