結果 : shortest distance algorithm python