All problems
Checkpoint Save Time
Problem
Estimate the time in seconds to write a checkpoint: checkpoint_bytes / (write_bandwidth_gbps * 1e9).
The signature is checkpoint_save_time_s(checkpoint_bytes, write_bandwidth_gbps). Return seconds as a float.
Hint
One gigabyte per second writes 1e9 bytes per second.
Test cases
case 1
in: [10000000000,10]
expected: 1
case 2
in: [5000000000,2.5]
expected: 2
case 3
in: [0,1]
expected: 0
case 4
in: [100,1]
expected: 1e-7
Starter codePython
def checkpoint_save_time_s(checkpoint_bytes, write_bandwidth_gbps):
# Your code here
pass4 test cases · run your code against them in the editor