Output: Part 1

This commit is contained in:
Les De Ridder 2017-02-23 20:24:32 +01:00
parent 260cd9a69a
commit 28bfb3b7e6
No known key found for this signature in database
GPG Key ID: 5EC132DFA85DB372
1 changed files with 12 additions and 0 deletions

12
main.py
View File

@ -47,8 +47,20 @@ def parseInput():
return videoCount, endpointCount, cacheCount, videoSizes, endpointDatacenterLatencies, endpointCacheLatencies, requestDescriptions
def printOutput(caches):
print(len(caches))
for cacheId, cacheVideos in caches.items():
print(" ".join(str (i) for i in [cacheId] + cacheVideos))
def main():
videoCount, endpointCount, cacheCount, videoSizes, endpointDatacenterLatencies, endpointCacheLatencies, requestDescriptions = parseInput()
# TODO: everything
#caches[0] = [1, 2, 3]
#caches[2] = [1, 2, 3]
printOutput(caches)
if __name__ == '__main__':
main()