fix function name
This commit is contained in:
parent
3983a072b0
commit
f623e74bbf
4
13/2.py
4
13/2.py
|
@ -6,7 +6,7 @@ def is_correct_timestamp(buses, timestamp):
|
||||||
|
|
||||||
# t -> initial timestamp
|
# t -> initial timestamp
|
||||||
# dx -> dx
|
# dx -> dx
|
||||||
def doa2(buses, t, dx):
|
def get_next_timestamp(buses, t, dx):
|
||||||
timestamp = t
|
timestamp = t
|
||||||
while True:
|
while True:
|
||||||
if is_correct_timestamp(buses, timestamp):
|
if is_correct_timestamp(buses, timestamp):
|
||||||
|
@ -25,7 +25,7 @@ buses = list(filter(lambda x: x[1] != None, tbuses))
|
||||||
dx = buses[0][1]
|
dx = buses[0][1]
|
||||||
t = buses[0][0]
|
t = buses[0][0]
|
||||||
for i in range(1, len(buses)):
|
for i in range(1, len(buses)):
|
||||||
t = doa2(buses[i:i+2], t, dx)
|
t = get_next_timestamp(buses[i:i+2], t, dx)
|
||||||
dx *= buses[i][1]
|
dx *= buses[i][1]
|
||||||
|
|
||||||
print(t)
|
print(t)
|
||||||
|
|
Loading…
Reference in a new issue