ProjectEuler 393. Migrating ants

某岛 at 
https://projecteuler.net/problem=393 Fork: http://www.shuizilong.com/house/archives/ural-1519-formula-1/……