All problems
Target Update Interval
Problem
Return the next step at which the target network will be synchronized: ((step // interval) + 1) * interval. A non-positive interval returns step unchanged.
Hint
At an exact multiple, the next sync is one whole interval later.
Test cases
case 1
in: [0,100]
expected: 100
case 2
in: [250,100]
expected: 300
case 3
in: [100,100]
expected: 200
case 4
in: [7,0]
expected: 7
Starter codePython
def next_target_update(step, interval):
# Your code here
pass4 test cases · run your code against them in the editor