The Scaling Law between Electron Time-of-Flight Distances and Loop Lengths in Solar Flares