Return answer in the wanted format for our tests.

This commit is contained in:
2017-12-16 15:15:17 +01:00
parent 06c422f2dd
commit d828b1a78e

View File

@@ -16,18 +16,20 @@ def main():
counter = 0
for i, entry in enumerate(entry_list):
entry = int(entry)-1
if entry == 0 and light_state:
counter += 1
light_state = False
if (counter >= 99):
highest_value.append(i)
if entry == 0:
if light_state:
counter += 1
light_state = False
if (counter >= 99):
highest_value.append(i)
else:
if memory[entry] == False and light_state == False:
memory[entry] = True
light_state = True
print(min(highest_value)+1)
answer = min(highest_value)+1
print(answer)
return answer
if __name__ == '__main__':
main()