Advertisement
Kosheen

Решение задачи про маршруты

Dec 27th, 2018
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.94 KB | None | 0 0
  1. mnsh=[[0, 10, 16, 22, 27, 16, 32, 35, 47, 42, 37, 30, 28, 48, 14], [10, 0, 6, 12, 19, 15, 22, 25, 37, 32, 39, 40, 38, 58, 24], [16, 6, 0, 6, 13, 9, 16, 19, 31, 26, 33, 40, 44, 54, 30], [22, 12, 6, 0, 7, 15, 10, 13, 25, 20, 27, 34, 38, 48, 36], [27, 19, 13, 7, 0, 11, 13, 16, 28, 23, 30, 37, 41, 51, 41], [16, 15, 9, 15, 11, 0, 24, 27, 39, 34, 41, 46, 44, 62, 30], [32, 22, 16, 10, 13, 24, 0, 3, 15, 10, 17, 24, 28, 38, 40], [35, 25, 19, 13, 16, 27, 3, 0, 12, 13, 20, 27, 31, 41, 43], [47, 37, 31, 25, 28, 39, 15, 12, 0, 5, 12, 19, 23, 33, 35], [42, 32, 26, 20, 23, 34, 10, 13, 5, 0, 7, 14, 18, 28, 30], [37, 39, 33, 27, 30, 41, 17, 20, 12, 7, 0, 7, 11, 21, 23], [30, 40, 40, 34, 37, 46, 24, 27, 19, 14, 7, 0, 18, 28, 16], [28, 38, 44, 38, 41, 44, 28, 31, 23, 18, 11, 18, 0, 20, 14], [48, 58, 54, 48, 51, 62, 38, 41, 33, 28, 21, 28, 20, 0, 34], [14, 24, 30, 36, 41, 30, 40, 43, 35, 30, 23, 16, 14, 34, 0]]
  2. a=int(input())-1
  3. for i in mnsh[a]:
  4.     print(i, end=' ')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement